OCP Chapter 1: Unterschied zwischen den Versionen

Aus wiki
Wechseln zu: Navigation, Suche
(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…»)
 
 
Zeile 2: Zeile 2:
  
 
== Inner Class ==
 
== Inner Class ==
Static vs Non-Static
+
===Static vs Non-Static===
  
 
Non-Static:
 
Non-Static:

Aktuelle 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.