• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

inner-class and Top level nested class?  RSS feed

 
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
 
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
 
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!