• Post Reply Bookmark Topic Watch Topic
  • New Topic

Inner classes  RSS feed

 
surya goutham datta rejeti
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read that method local inner-classes cant access method local variables, excepts for mehtod local final variables.The problem with accesiing method local variables is their life time. But what about life time and scope of method local final variables. Please clarify.
Thanks in advance
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The instance of the inner class retains a copy of the method local final variable. As it is declared final, its value cannot change so there is no possibility of the copy ever being out of sync.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!