OCP Chapter 1

Aus wiki
Wechseln zu: Navigation, Suche

Nested Class

Inner Class

Static vs Non-Static

Non-Static: A non-static nested class has full access to the members of the class within which it is nested.

Static: A static nested class does not have a reference to a nesting instance, so a static nested class cannot invoke non-static methods or access non-static fields of an instance of the class within which it is nested.