Object-Oriented Programming · Question 2 · Easy

Method overloading (same method name, different parameter lists in one class) is an example of:

  1. Compile-time (static) polymorphism
  2. Runtime (dynamic) polymorphism
  3. Encapsulation
  4. Dynamic method dispatch
Answer and explanation

Answer: A. Compile-time (static) polymorphism

Explanation: The compiler picks the overloaded method from the argument types, so overloading is compile-time polymorphism. Overriding resolved through a base-class reference is runtime polymorphism.

Previous: Which OOP concept means bundling data and the methods that operate on it into… · Next: Which OOP feature lets a single reference of a parent type call different…

Practise object-oriented programming

Try a fresh set of object-oriented programming questions with an explanation after every answer, free and without signing up: Object-Oriented Programming practice. Or sit a full placement mock test.

More object-oriented programming questions

More technical & programming practice

DBMS · SQL · Operating Systems · Computer Networks · Software Engineering · Cloud & DevOps · GenAI Basics · Pseudo-code

LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge