This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes Inner Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Inner Class" Watch "Inner Class" New topic

Inner Class

manu chandra

Joined: Oct 08, 2012
Posts: 15
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

Joined: Oct 13, 2005
Posts: 38441
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.
I agree. Here's the link:
subject: Inner Class