Multiple choice

A class can have many methods with the same name as long as the number of parameters or type of parameters is different. This OOP concept is known as

  1. Method Invocating

  2. Method Overriding

  3. Method Labeling

  4. Method Overloading

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

Method overloading allows a class to have multiple methods with the same name but different parameter lists (different number of parameters, different types, or both). This is compile-time polymorphism. Method overriding is when a subclass provides a specific implementation of a method already defined in its superclass (same name and parameters).