• Post Reply Bookmark Topic Watch Topic
  • New Topic

inner-class and Top level nested class?  RSS feed

 
samdeep aarzoo
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody
what are the different between inner-class and Top level nested class?
please tell me
 
Richard Anderson
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This may help:

http://www.javaworld.com/javaworld/javaqa/1999-08/01-qa-static2.html

Google is your friend ;-)

-Rich, SCJP
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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 in 2000 (I think), they removed this horrible bit of terminology. (Thank you, Sun.) 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. And please, please don't continue to spread the term "top-level nested class" as it's been dead for some time now.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!