Search⌘ K

Challenge #1: Override a Method using the Super Keyword

Explore how to override a method in a derived Java class while accessing the base class's method with the super keyword. This lesson helps you understand polymorphism by modifying method behavior in subclasses for more flexible code.

Problem Statement

When a method in a derived class overrides a method in a base class, it is still possible to call the overridden method using the super keyword.

If you write super.method(), it will call the method that was defined in the superclass.

You ...