• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Top level nested classes?

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which of the following statements are true about Inner classes?
A top level nested class is a static class and thus does not need an instance of it's enclosing class. (Jwhiz exam #1,Q13)
My Question: Top level class means non-inner, nested class means inner, how can there be a top level nested class?
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mike
A static inner clas is commonly refered to as a top level nested class. Because it's static, like all other static variables, it doesn't need an instance of the outer class to be created.
hope that helps
Dave
 
Mike Kelly
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Dave Vick:
Mike
A static inner clas is commonly refered to as a top level nested class. Because it's static, like all other static variables, it doesn't need an instance of the outer class to be created.
hope that helps
Dave


Alrighty then. Because I have no other programming experience, I'm suceptible to mistakes like these. I had never heard the term. I knew top level and nested, but not toplevel nested.
Thanks again.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic