Posts

Showing posts from November, 2016

Variable is accessed from within inner class needs to be declared FINAL

You can declare the variable final, or make it an instance (or global) variable. If you declare it final, you won't be able to change it later. Any variable defined in a method and accessed by an anonymous inner class must be final. Otherwise, you could use that variable in the inner class, unaware that if the variable changes in the inner class, and then it is used later in the enclosing scope, the changes made in the inner class did not persist in the enclosing scope. Basically, what happens in the inner class stays in the inner class.   Also, if two methods see the same local variable, Java wants you to swear you will not change it - FINAL, in Java speak. Together with the absence of by-reference parameters, this rule ensures that locals are only assigned in the method that they belong to. Code is thus more readable.

Love in Paris :)

Image
One day I felt of putting down my love and devotion for painting through painting. I think my statement is confusing and equally hard to understand... As said, Eiffel Tower is symbol of love, I felt of painting it!! The blue sky background is created by knife and I love it :)