The Java programming language allows you to define a class within another class. Such a class is called a nested class.