This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

static inner class

 
hari harann
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when we declare the inner class as static it turns it into a static nested class not an inner class.. is the statement right?? explain me please.. Thanks in advance
 
Mark Vedder
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a terminology thing. From the Sun Java Tutorial on nested classes:


Terminology: Nested classes are divided into two categories: static and non-static. Nested classes that are declared static are simply called static nested classes. Non-static nested classes are called inner classes.

Take a look at the page for more info. Also see the tutorial page on inner classes. Lastly, you can look at the Java Glossary's page on nested classes
[ August 07, 2008: Message edited by: Mark Vedder ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic