Skip to main content

Kingsley Osime: Using inner and nested Java classes

Inner classes might at first seem like a whole new language to the uninitiated but they are a nice feature in Java that allow you to logically group related classes and control the visibility of one class from outside of the other. Even more than that, inner classes provide you with the ability to inherit from more than one interface or implementation in a kind of "multiple implementation inheritance". The code in an inner class can be used to manipulate the members of the outer class within which it exists. Inner classes are not limited to...

Community: General