GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

inheritance

Philip Mylet Englisch

Inhalt der Mindmap

inheritance

  • extending or subclassing  declare subclasses final by saying final is-a relationshipparent child classes
  1. distinguishes OOP languages

  2. benefits

    • add functionalities to original class
    • change behaviors of original class
  3. extend by writing extends after child class name and before parent

  4. ex animals

  5. legal to assign an instance of a subclass to a reference variable of the parent type.

  6. can access public and protected just not private of parent class

  7. override methods from the parent class

  8. when you create a child object, all its parent classes are also instantiated.

  9. you can call the parent’s constructor from a subclass’s constructor by using the super keyword, but super must be the first statement in the constructor.

  10. you can cast an object to another type (Parent)

  11. use if for instanceof

Informationen

Beschreibung
Mindmap am inheritance, erstellt von Philip Mylet am 06/08/2019.
Erstellt von
Philip Mylet
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck