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

Mindmap

Inheritance

Katie Arnott Englisch

Inhalt der Mindmap

Inheritance

  1. what makes the code accessible in any OOP language

  2. the process of extending a class

    • can create a new class that will have a "parent child" relationship with the original
      • child class can be extended too until you specifically declare it as final
    • use EXTENDS keyword, after the class name and before parent class
  3. special "is-a" relationship created when extending a class

    • then can assign instance of subclass to a reference variable of the parent type
  4. from within subclass, can access a superclass public methods but not private

  5. you can override a method by writing new method in subclass, except a final method

    • if you do not explicitly write a constructor for a subclass, the compiler will implicitly add a no argument constructor
    • can use super keyword to call a hidden method in addition to helping implicitly write constructors
  6. can cast instance of subclass to its parent class

Informationen

Beschreibung
Mindmap am Inheritance, erstellt von Katie Arnott am 21/11/2019.
Erstellt von
Katie Arnott
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck