Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Top level inner class, nested class, inner class,

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've seen a lot of topics involving these naming conventions. I am a little bit confused. Since the Java Certification book doesn't use nested class at all. I am assuming that top level inner class means static member inner class, nested class means non-static member inner class?
Thanks in advance.
 
Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bill Brodgen, Java2 Exam Cram.
p.82
"What is a nested class?
Generally speaking, a nested class is a member of another class. However, it is common to speak of the static members as nested and the nested classes that are members of instances of the enclosing class as inner classes. Indeed you are most likely to read about inner classes only, but the more general term is nested classes."
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, to put it in another way:
Static member classes can be referred as nested classes. Non-static member classes are referred as inner classes more oftenly though people are using inner classes for both of them?
What about top-level inner class? It means Static member classes?
Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic