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
did not understand it clearly.
Any ideas, resources,sample code,links, highly appreciated. thanks in advance.