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
Overriding refers to providing a different implementation for a method inherited from a superclass or interface in its subclass or implementing class respectively. It allows the subclass to customize the behavior of inherited methods.
The super keyword is used to refer to the superclass or parent class. It can be used to call overridden methods or access superclass members from within a subclass.
final: When applied to a method, the final keyword prevents it from being overridden in any subclasses. It ensures that the method's implementation remains unchanged.
abstract: Abstract methods are declared without an implementation in an abstract class or interface. Subclasses must provide their own implementation for these methods.