This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
We have a rule that " A method-local inner class cannot access the local variables in the method in which it is declared" but when we make local variables as final we can use them in the method local inner class. Can any body explain what the real difference when we make local varables as final so that they can be used in method-local inner classes.
When a method exits, its local variables are destroyed. But an instance of a local class might continue to exist after the method exits, and if it tried to access a local variable at that point, there would be a problem. On the other hand, if a local variable is final, then its value can be copied into the instance of the local class, and the instance can use it essentially as a constant.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com