Mindmap
Inheritance
Inhalt der Mindmap
Inheritance
Parent class
- P has three methods, one public, one protected, and one with the default access level
- class has only one constructor, the one that accepts a String
- Child class
- C is a subclass of P . As you can see in the C class’s testMethods method, C can access its parent’s public and protected method. In addition, because C and P are in the same package, C can also access P's default method
- P has three methods, one public, one protected, and one with the default access level
Box Class
- overrides the public toString method and the protected clone method.
- overrides the public toString method and the protected clone method.
Type Casting
- To upcast a Child object, all you need to do is assign the object to a reference variable of type Parent .
Inheritance makes code extensible.
Informationen
- Beschreibung
- Mindmap am Inheritance, erstellt von Ryan Weems am 21/11/2019.
- Erstellt von
- Ryan Weems
- Aufrufe
- 0
- Bewertung