It might not be obvious how an instance of a local class could still be reachable after the method exits. The key is in upcasting the reference to a type that exists outside the method's scope, as illustrated here...
The invoked methods(and their variables) goes on to the call stack.Classes once loaded, resides on the heap. Method local classes are no exception to this. Method variables survive till method itself is alive after which they are flushed from the stack. But local classes may still have their reference with other variables hence they cannot be destroyed. And thats the reason why local classes can only access final method variables so that the method lives or dies final var's value will always be the same. If at all local classes were holding non-final variables, and if anybody tries to change its value, jvm will throw exceptions as method may not be alive.
Its a j a v a
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