OCP Chapter 1: Unterschied zwischen den Versionen
Aus wiki
(Die Seite wurde neu angelegt: «= 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 ne…») |
(kein Unterschied)
|
Version vom 31. Januar 2017, 09:42 Uhr
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.