File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes How Method Local innerclass accesses a final variable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "How Method Local innerclass accesses a final variable" Watch "How Method Local innerclass accesses a final variable" New topic
Author

How Method Local innerclass accesses a final variable

Praveen Babu
Ranch Hand

Joined: Jul 30, 2006
Posts: 138
Hi Friends

I want to know how a method local inner class accesses a final variable. I learnt that Method Local inner classes doesnt accesses the local variables of the method they are in because the stack frame is lost once out of scope. So is there something with final variables that overcomes this ?

Thanks,
Praveen
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023
Check this thread.
Praveen Babu
Ranch Hand

Joined: Jul 30, 2006
Posts: 138
Hi,

Thanks for the reply. I got what i wanted and my doubt is cleared now. Thanks again

Bye & Regards,

PRAVEEN
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How Method Local innerclass accesses a final variable
 
Similar Threads
about method-local inner class can not use variables declared within the method
Method local inner class and accessing local variables
Resurrecting Method Local Inner Class?
why 'method local inner class' can only access final variable?
Anonymous classes defined in a method and final var