File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes top level nested class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "top level nested class" Watch "top level nested class" New topic

top level nested class

pooja jain
Ranch Hand

Joined: Jan 12, 2005
Posts: 213
can any body please explain me the top level nested class with example .
thanks in advance .
pooja .

Edwin Dalorzo
Ranch Hand

Joined: Dec 31, 2004
Posts: 961
Please visit this site to get your answer:
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
top level nested class means static inner class ... as you may know that to accessing static members JVM don't need objects . so we can access this static inner clsss without the object ( instance ) of outer class , we can access them directly by class name .

hope it will help . if want more details then many experts are here to help you out .
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
"Top-level nested class" is an old term for a static nested class. Calling this "top-level" was a bad idea in the first place, needlessly confusing (how can something be both nested and top-level?), and when Sun released the Java Language Specification 2nd edition several years ago, they removed this odious bit of terminology. (Thank you, Sun.) That is also why the tutorial Edwin referenced does not mention the term. Unfortunately many books still exist which use the term, either because they're old, or the author(s) didn't realize the olde term had been removed from the language. So, any time you see the term "top-level nested class", just pretend they said "static nested class" or "static member class" instead.

"I'm not back." - Bill Harding, Twister
I agree. Here's the link:
subject: top level nested class
It's not a secret anymore!