Written by the Fiveable Content Team โข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโขWritten by the Fiveable Content Team โข Last updated September 2025
Definition
`super()` is a keyword in Java that is used to call the constructor of the superclass. It allows you to invoke the superclass's constructor and initialize its instance variables.
Inheritance is a mechanism in Java where one class inherits properties and behaviors from another class. It enables code reuse and promotes a hierarchical relationship between classes.
A constructor in Java is a special method used to initialize objects. It has the same name as the class it belongs to and is automatically called when an object of that class is created.
A subclass, also known as a derived class or child class, is a class that inherits properties and behaviors from another class (known as the superclass). The subclass can extend or override these inherited features.