Inner classes doesnot have access to method(local) variable.
The new instance of anonymous class is a inner class declared inside a method.
And tthese classes have access only to final variables declared in the method.
This is mainly because
U can create an instance of the inner class and return the refernce to any calling object. Inner classes always has an outer class reference associated with it. However it doesnot have the reference of the method variables. However Final is treated as a constant in
Java.
For (eg)
if int 'i' is printed out, there will defintely be an error.
Hope this helps.