Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is inner class can be static . what is the purpose of inner class ??

 
yogendra singh
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is inner class can be static . what is the purpose of inner class ??
 
Stephen Huey
Ranch Hand
Posts: 618
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yogendra,
Please forgive some of the locals, as they can be a bit grumpy sometimes.
Some developers might use static inner classes for organizational purposes - to control namespace - or to be able to access some private static member of the outer class.You might like to read the "I hate static!" section of the "Getting in Touch with your Inner Class" JavaRanch Campfire story.
 
yogendra singh
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dirk ,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic