• Post Reply Bookmark Topic Watch Topic
  • New Topic

Inner Classes  RSS feed

 
Tyler Jordan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can a single inner class instance be tied to multiple outer class instances? If not, is there a work-around?
 
Angel Dobbs-Sciortino
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can add a static modifier to your inner class. It isn't called an inner class anymore after that; then it is a static nested class.
Angel
[ November 17, 2003: Message edited by: Angel Dobbs-Sciortino ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!