This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Inner Classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Inner Classes" Watch "Inner Classes" New topic
Author

Inner Classes

Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 175
Can any one tell why is Static members ( variables + methods ) not allowed in Inner classes ??
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

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


Muhammad Saif Asif Mirza
OCJA(5/6) OCJP(6) OCJWCD(6)
Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 175
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

Joined: Feb 23, 2013
Posts: 94
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

Joined: Feb 20, 2013
Posts: 175
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inner Classes