Inner Classes

1.1 Introduction To Inner Classes

Inner classes are classes that are defined within other classes. Inner classes became available with Java 1.1, there are 4 type of inner classes.
Learn More...

1.2 Member Inner Classes

You can have any number of inner class object inside outer class code. If both inner class and Outer class are public, then some other class can also create an instance of the inner class.
Learn More...

1.3 Local Inner Classes

Local inner classes is declared inside a code block or method. Local inner classes are never declared with an access modifiers like public, protected, private, default. Their scope is always restricted to the block in which they are declared.
Learn More...

1.4 Anonymous Inner Classes

A class that has no name is known as anonymous inner class. They enable you to declare and instantiate a class at the same time. They are like local classes except that they do not have a name. Use them if you need to use a local class only once.
Learn More...

1.5 Static Inner Classes

Static members of the outer class are visible to the static inner class, whatever their access level be.
Learn More...