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

Mind map

Inheritance

Ryan Weems English

Map content

Inheritance

  1. 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
  2. Box Class

    • overrides the public toString method and the protected clone method.
  3. Type Casting

    • To upcast a Child object, all you need to do is assign the object to a reference variable of type Parent .
  4. Inheritance makes code extensible.

Information

Description
Mind Map on Inheritance, created by Ryan Weems on 21/11/2019.
Created by
Ryan Weems
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?