nested class

A class declared inside another class, which the compiler still writes to its own class file.

In more detail

A static nested class, like Heavy inside Lazy in the course, is an ordinary class that happens to be grouped with its outer class. It is loaded and initialized on its own schedule. Its class file is named Outer$Inner.class.

Example

Lazy.java compiles to Lazy.class and Lazy$Heavy.class

Related terms

Taught in

References

Certification courses