• 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
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!