Multiple choice

Method overriding is

  1. Method with different number or type of parameters

  2. When the JVM overrides your calls for Garbage Collection.

  3. None of the Above

  4. Same method signature but different implementation

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Method overriding occurs when a subclass provides a specific implementation for a method that is already defined in its superclass. The overriding method must have the exact same name, return type, and parameter list (signature) as the method in the parent class. This allows for runtime polymorphism.