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
The Car class is a subclass that extends the Vehicle class. It inherits properties and methods from the Vehicle class and can also define its own unique properties and methods.
A subclass is a derived class that inherits properties and behaviors from its superclass (parent class). In our case, Car is considered a subclass because it extends the functionality of the Vehicle superclass.
Parent Class: The parent class, also known as superclass or base class, is the original class from which other classes inherit properties and methods. In our case, Vehicle would be considered the parent class for Car.
Extends: "Extends" is a keyword in Java used to indicate that one class (subclass) inherits characteristics from another (superclass). It establishes an inheritance relationship between two classes.