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

Mind map

Inheritance

Tyler Stephens English

Map content

Inheritance

  1. You can extend a class with the "extends" command. A class can only extend one other class.

  2. A subclass inherits all public methods of its superclass. However, all private methods in the superclass are not accessible by the subclass.

  3. You cannot access a protected method of a superclass from a subclass (ex. subclass.protectedmoethod()) .

  4. You can overload a method in the parent class by writing a method in the child class that has the same name but different functionality.

  5. You can override a method by writing a method in the child class with the same signature as a method in the parent class. This changes the behavior of the method in the parent class.

  6. You can only cast an object from a subclass to its superclass.

  7. Inheritance allows you to add functionality that doesn't already exist in the class

  8. A subclass is a special type of its superclass

  9. When you create a child object, all parent classes are also initiated.

  10. You can prevent classes from extending a class by making it a final class.

Information

Description
Mind Map on Inheritance, created by Tyler Stephens on 21/11/2019.
Created by
Tyler Stephens
Views
2
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?