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. A. Method Invocating

  2. B. Method Overriding

  3. C. Method Labeling

  4. D. Method Overloading


Correct Option: D

AI Explanation

To answer this question, we need to understand the concept of method overloading in object-oriented programming (OOP).

Option A) Method Invocating - This option is incorrect because there is no such concept in OOP called "Method Invocating."

Option B) Method Overriding - This option is incorrect because method overriding refers to the ability of a subclass to provide a different implementation of a method that is already defined in its superclass.

Option C) Method Labeling - This option is incorrect because there is no such concept in OOP called "Method Labeling."

Option D) Method Overloading - This option is correct. Method overloading is the ability to define multiple methods with the same name within a class, as long as the number or type of parameters is different. This allows for flexibility and code reusability by providing different ways to invoke a method based on the arguments passed.

The correct answer is D) Method Overloading.

Find more quizzes: