aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Local class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Local class" Watch "Local class" New topic
Author

Local class

Valentin Jacquemin
Ranch Hand

Joined: Feb 15, 2006
Posts: 35
Hello everybody,

I'm a little bit confuse this morning (yes it's the morning in switzerland ;-)). Well i'm confuse because I'm learning stuff about local class and ok, we must mark a variable as final in the method if we want to access it in the local class. But then if we create a local class that access it and then reference it and finally we send this new object to an another location, the member variable won't be garbage collected?

So in this case, the scope of this local variable is extended, is it true what I said?

Thanks
Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643
it would be better if you will write some code then we
will discuss here.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Local class