Local variables and method parameters can be used if they are declared "final".
The compiler actually passes the local vars to the constructor/initializer (anonymous local classes do not have constructors) of the anonymous class. Instance members are accessed through hidden private accessor methods.