An inner class defined inside a method cannot access the method\'s local variables unless these local variables are marked final.I\'ve looked a
Method Local inner classes can’t use local variable of outer method until that local variable is not declared as final. The main reason we need to declare a local variable as a final is that local variable lives on stack till method is on the stack but there might be a case the object of inner class still lives on the heap.
checkout this article: http://www.geeksforgeeks.org/inner-class-java/