¡GoConqr estrena diseño! Cuéntanos qué te parece.

Mapa mental

Inheritance

Vincente Squitiro Inglés

Contenido del mapa

Inheritance

  1. Relationship between classes

    • Parent
      • Other names
        • Superclass
        • Base Class
    • Child
      • Other names
        • Subclass
        • Derived class
      • Can access the parents methods and fields that are...
      • Can overwrite the parents methods and fields that are...
    • Child inherits the methods of the parent
    • Child can add functionality that doesn't exist in the parent
    • The parent class' constructor is called when the child class is initialized, the parent class's parent is called, etc.
  2. Keywords

    • extends
      • Used to extend a class
      • All Java classes automatically extend the java.lang.object class
    • super
      • Represents an instance of the direct parent class
      • The child class can use to call the parent class' overwritten or hidden members
    • final
      • Prevents a class from being extended
    • instanceof
      • Used to determine if an object is of a specified type
  3. The behavior of the child class can be changed to address needs that the parent class does not (overwriting)

  4. A child class can only extend one direct parent class

  5. The child and parent have an "is a" relationship: the child "is a" version of the parent

  6. Accessibility

    • public
    • protected
    • default (only if the same package)
  7. Child classes can be "upcast": defined as the parent class' type

Información

Descripción
Mapa Mental sobre Inheritance, creado por Vincente Squitiro el 02/08/2019.
Visitas
0
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?