it says like this: non-static inner class can access ANY member variable in the enclosing(outter) class, and the answer is true; but for a local inner class, it can only access the member variable which defined as final. so I think the answer is false.
The answer is true. The question is about member variables of enclosing class... but you are thinking local variables of a method.. if the inner class is defined with in a method, only the final variables of the method are accessable from the class.
answer is correct.question is about enclosing class.not about enclosing context.innerclass can access any variables from its enclosing class. can we declare class inside an interface?