Why local inner class cannot access non-final local variables? (Java 1.7)

But when a method ends, the scope of local inner class ends. We can not access the inner class object once the

method is over.

I know when a method ends the local variables get lost from the stack but also when a method ends we cannot access the inner class object( i.e in the heap).Then why it still needs to have access to local variables....

Read More »

By: StackOverFlow - Tuesday, 13 March

Related Posts