hi friends...
I have a doubt with method-local inner class.
I understand that the method-local inner class object doesn't have access to the local variables of the method the inner class is in. This is because the local variables live on the stack and their life is over once the method completes.. But the inner class object may still be alive even after the method completes.
Hence the object doesn't have access to the local variables. But if they are marked as final, the object is able to access it. HOW..? Do the final variables live on the heap like the object?
Kindly explain and thanks in advance for any reply.