GoConqr has a new look! Let us know what you think.

Mind map

inheritance

Philip Mylet English

Map content

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

Information

Description
Mind Map on inheritance, created by Philip Mylet on 06/08/2019.
Created by
Philip Mylet
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?