Why do I need to declare a local variable as final if my Inner class defined within the method needs to use it ?
local variable
final
Inner class
Example :
The answer is the two are in different scopes. So that variable could change before the inner class accesses it. Making it final prevents that.