This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

inner classes

 
Dhanashree Mankar
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1> can the name of inner class and enclosing class be same?
2> is this true?
we cann't access a data member declared in other method from local class or from anonymous class?
3> are we accessing non-static members declared in enclosing class from non-static anonymous class as follows
enclosingclassname.this.nonstaticmember
is this the difference bet. local and anonymous class?
 
nowait shen
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. No
2. I guess it's true
3. we access that with nonstaticmemeber()
see the following example
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic