This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes inner Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "inner" Watch "inner" New topic


Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I read that non static inner class may have a statics member
What static members??
Thank you in advance.
swati bannore
Ranch Hand

Joined: Oct 18, 2000
Posts: 201
It Can have static final variables..
Correct me if i am wrong

Swati Kale
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Non-Static Inner Classes cannot have Static members. I agree with Swati.
Toying around with this code might help.

[This message has been edited by Shyamsundar Gururaj (edited September 12, 2001).]
Bindesh Vijayan
Ranch Hand

Joined: Aug 21, 2001
Posts: 104
I want to add to this disucssion that non-static inner class can inherit static members if needed.
I agree. Here's the link:
subject: inner
Similar Threads
Question about static class
Member class can have static variables??
Top-level classes
is inner class can be static . what is the purpose of inner class ??
doubt on Inner class