Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

inner classes question


For a class defined inside a method, what rule governs access to the variables of the enclosing method?

1 ) The class can access any variable
2) The class can only access static variables
3) The class can only access transient variables
4) The class can only access final variables

>>>>The class can only access final variables

Note that this restriction applies to variables in the enclosing method, not the enclosing class



I was reading above question from link

http://www.jchq.net/certkey/0401certkey.htm
did not understand it clearly.


 Any ideas, resources,sample code,links,  highly appreciated. thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gudii9

ASKER

>>exception handler parameter used but not declared in an inner class must be declared final

how to use exception handler paramete inside inner class. Can you please point me to some simple example.
:)