Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Static nested Interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Static nested Interface" Watch "Static nested Interface" New topic

Static nested Interface

Vivek Nidhi
Ranch Hand

Joined: Aug 10, 2003
Posts: 133
Can some spread lights to the behaviour of this Static nested interface.
Can some one point me to some materials on Inner classes
Vivek Nidhi
[ December 05, 2003: Message edited by: Vivek Nidhi ]
Kalai Ganesh
Ranch Hand

Joined: Sep 08, 2003
Posts: 32
There is static inner class(top-level nested class). But there is no static inner interface.
Basically the interface methods have to be overridden by some implementing class. If u have an inner static interface, it's like declaring it both abstract and static (which is not possible).
Also static methods cannot be overridden. (Though it can be redefined in the subclass).
If you take Dan's chapter-wise test on inner classes you can understand it well through the explanation provided by him. I think there is a link to his site in javaranch mock exam list.
Hope this helps.
Consider Paul's rocket mass heater.
subject: Static nested Interface
Similar Threads
Passed SCJP1.4 with 85%
Passed SCJP with 98 %
Passed SCJP with 98%
ordered and Sorted Collection