This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Inner Class  RSS feed

 
manu chandra
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys I am new to java..
I know there are 4 types of inner class.
static inner class
non static inner class.
local inner class
anonymous inner class.

But what is the use of inner class?
Is there some big advantage of using these classes?

 
Campbell Ritchie
Marshal
Posts: 56193
171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your nomenclature is not quite right. Start in the Java tutorials. And, yes, there are great advantages to nested classes; we can have classes which are used only by another class and give them local scope or private access.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!