aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes why access to non-final local variables is not permitted from local classes? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "why access to non-final local variables is not permitted from local classes?" Watch "why access to non-final local variables is not permitted from local classes?" New topic
Author

why access to non-final local variables is not permitted from local classes?

sura watthana
Ranch Hand

Joined: Sep 13, 2004
Posts: 77
I'm wondering why access to non-final local variables is not permitted from local classes? Could somebody tell me the reason why? Thank you

David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
Read this article
http://www.javaranch.com/campfire/StoryInner.jsp


SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
Saheed Adepoju
Ranch Hand

Joined: Jun 23, 2004
Posts: 267
Remember that local variables are only available to the method! After the method returns there would be no reference to the variable any longer! But if it were made final the value of the local variable doesnt change even if the method returns1 hope u understand.


Saheed Adepoju<br />SCJP 1.4<br />SCJD (B&S..In progress)
 
Don't get me started about those stupid light bulbs.
 
subject: why access to non-final local variables is not permitted from local classes?