This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

nested class and inner class

 
Abhishek Reddy
Ranch Hand
Posts: 259
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the difference between nested class and inner class?
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This story about inner classes might give you some insight.
 
Jean-Francois Briere
Ranch Hand
Posts: 101
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a very simple yet complete summary of the picture about nested/inner classes:
nested classes

Regards
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic