• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Local class

 
Valentin Jacquemin
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it would be better if you will write some code then we
will discuss here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic