Abhi vijay wrote:No, Punit .
Can you tell me why local method inner classes cannot access the non-final variables of the method??
1) As local variables lives on stack, and your innerclass object will live on heap.
2) You can pass your innerclass object's reference outside your method, and it will be still accessible after your method ends.
3) local variables will garbage collected after your method ends.