Possible Duplicate:
Java - inner class and local variables
How does marking a variable as final allow inner classes to access them?
Local Inner class can not only access the instance variables but local variables of the method (in which they are defined) as well, but the local varible has to be declared final
.
Why the local variables have to declared to be final
in this case?