This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • 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:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

top level nested class

 
greenhorn
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can any body please explain me the top level nested class with example .
thanks in advance .
pooja .
 
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please visit this site to get your answer:

http://java.sun.com/docs/books/tutorial/java/javaOO/nested.html
 
Ranch Hand
Posts: 3850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
top level nested class means static inner class ... as you may know that to accessing static members JVM don't need objects . so we can access this static inner clsss without the object ( instance ) of outer class , we can access them directly by class name .



hope it will help . if want more details then many experts are here to help you out .
 
Wanderer
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 several years ago, they removed this odious bit of terminology. (Thank you, Sun.) That is also why the tutorial Edwin referenced does not mention the term. 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.
 
It is no measure of health to be well adjusted to a profoundly sick society. -Krishnamurti Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!