Java allows to define a class inside another class, known as nested classes. There are four types of nested classes in java. [crayon-5b750330f2636231999230/] Static nested classes Non-static nested classes Anonymous classes Local classes Static nested classes In the example below : Car is an outer class and whereas Wheel is a static inner class. Both