Java allows to define a class inside another class, known as nested classes. There are four types of nested classes in java. [crayon-5bf34d61f3ba6843607162/] 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