What are the types of inner classes (non-static nested class) used in Java?

Solution:

There are mainly three types of inner classes used in Java.

Type Description
Member Inner Class A class created within class and outside method.
Anonymous Inner Class A class created for implementing an interface or extending class. Its name is decided by the java compiler.
Local Inner Class A class created within the method.
0 answers