OCP Chapter 1

Aus wiki
Version vom 31. Januar 2017, 09:42 Uhr von Christofbuechi (Diskussion | Beiträge) (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…»)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
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.