KnowledgeBoat Logo
|

Computer Applications

Which of the following is NOT true for polymorphism?

  1. All methods have the same name.
  2. Methods are invoked based on the arguments.
  3. Methods should have the same number and the same type of arguments.
  4. It is a principle of OOPs.

OOP Intro Java

1 Like

Answer

Methods should have the same number and the same type of arguments.

Reason — Polymorphism allows methods with the same name to behave differently based on the number or type of arguments passed. Hence, methods do not need to have the same number and same type of arguments.

Answered By

2 Likes


Related Questions