This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Java in General and the fly likes Top level Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Top level Class" Watch "Top level Class" New topic
Author

Top level Class

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Need what is meant by Top level class.
Example Static Inner Class ? How are they top level classes. Main Difference between Top level Class as a result of static modifier and Normal Top Level Class.
Amar Srivastava
Greenhorn

Joined: Jul 25, 2000
Posts: 3
well Static inner classes are not top level classes, they are technically speaking called "top-level nested classes" which differentiates them from just plain top-level classes. Top level classes on the other hand are public/default classes that are held in .java files and are not enclosed in any other classes
[This message has been edited by Amar Srivastava (edited July 25, 2000).]
ricky gonzalez
Ranch Hand

Joined: Jun 30, 2000
Posts: 167
Top level classes are the independent, free classes that can be either public or default. Static inner classes are considered top level because they are really independent from the enclosing class and can be called at anytime separately from its outer classes.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
hi,
Top level classes can be defined as classes that are
1)static class members and
2)classes which are package members
Thus nested classes(static class members) are indeed Top Level classes.
for futher info on inner classes visit http://java.sun.com/products/jdk/1.1/docs/guide/innerclasses/spec/innerclasses.doc1.ht ml
regds.
Rahul

[This message has been edited by rahul_mkar (edited July 26, 2000).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Top level Class