aspose file tools*
The moose likes Java in General and the fly likes nested class and inner class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "nested class and inner class" Watch "nested class and inner class" New topic
Author

nested class and inner class

Abhishek Reddy
Ranch Hand

Joined: Mar 28, 2006
Posts: 259
what is the difference between nested class and inner class?


Abhishek
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9047
    
  10
This story about inner classes might give you some insight.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Jean-Francois Briere
Ranch Hand

Joined: Mar 03, 2004
Posts: 101
Here is a very simple yet complete summary of the picture about nested/inner classes:
nested classes

Regards
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Be aware that these terms are not always used consistently, especially in older material. (Surprisingly, Eckel's Thinking in Java is still not in agreement with the Java Language Specification.)

According to the current JLS...

"A nested class is any class whose declaration occurs within the body of another class or interface." (JLS 8)

"An inner class is a nested class that is not explicitly or implicitly declared static." (JLS 8.1.3)
[ August 27, 2006: Message edited by: marc weber ]

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: nested class and inner class