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

Inner Classes

 
Tarun Oohri
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one tell why is Static members ( variables + methods ) not allowed in Inner classes ??
 
Saif Asif
Ranch Hand
Posts: 440
Eclipse IDE Hibernate Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings Oohri ,

Static members are allowed in the inner classes , provided you keep the inner class static as well. Inner classes can be declared static
 
Tarun Oohri
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Saif Asif wrote:Greetings Oohri ,

Static members are allowed in the inner classes , provided you keep the inner class static as well. Inner classes can be declared static


Thanks Asif
 
Nancy Avent
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am reading OCPJP 7 book by Ganesh/Sharma and I must say that the topic about Inner classes is superbly written. I suggest you to go look at that.
 
Tarun Oohri
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nancy Avent wrote:I am reading OCPJP 7 book by Ganesh/Sharma and I must say that the topic about Inner classes is superbly written. I suggest you to go look at that.

Thanks for your concern Nancy...will go through that book aswell
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic