In OOP, what is method overloading?

2025

In OOP, what is method overloading?

  1. A.

    Creating multiple constructors

  2. B.

    Using multiple inheritance

  3. C.

    Defining multiple methods with the same name but different parameters

  4. D.

    Inheriting multiple methods from a parent class

Attempted by 342 students.

Show answer & explanation

Correct answer: C

Method overloading in OOP refers to defining multiple methods in a class with the same name but different parameter lists. The methods must differ in the number, type, or order of parameters. The compiler selects the appropriate method based on the arguments passed during the call.

OOP में मेथड ओवरलोडिंग का अर्थ है एक क्लास में एक ही नाम के साथ कई मेथड परिभाषित करना, लेकिन अलग-अलग पैरामीटर सूचियों के साथ। मेथड्स को पैरामीटरों की संख्या, प्रकार या क्रम में अलग होना चाहिए। कॉल के दौरान पास किए गए आर्गुमेंट्स के आधार पर कंपाइलर उपयुक्त मेथड का चयन करता है।

Explore the full course: Bpsc