Nested Classes in Java
In object-oriented languages, a nested or inner class is a class that’s completely declared within another class. This allows us to combine classes that are logically bound together, to increase encapsulation, for more concise and maintainable code. Here’s a quick, non-deep-dive overview of the 4 types of nested classes.