Mindmap
Inheritance
Inhalt der Mindmap
Inheritance
Functions by extending a class
- Parent Class
- Represents the characteristics common to all child classes
- Has methods common to all child classes
- Has attributes common to child classes
- Child Class
- Represents specific characteristics to each child class
- super();
- Initializes an instance of the direct superclass of the current object
- Must be the first statement in the constructor
- Can also be used to call a hidden member or an overridden method
- Override
- Changes the behavior of a method in the parent class
- If the method has the same name, but the arguments differ, it's considered overloading
- Final prevents a class from being extended
- Parent Class
Keywords:
- 'extends' to actually attribute a subclass to another class
- 'final' to prevent the class from being extended
- 'instanceof' to test if an object is of a specified type
Overrides
- When you change the functionality of a method in the parent class
Type Casting
- Down Casting
- Up Casting
Informationen
- Beschreibung
- Mindmap am Inheritance, erstellt von Nova Saint am 21/11/2019.
- Erstellt von
- Nova Saint
- Aufrufe
- 3
- Bewertung