हिंदी

In constructor overloading all constructors should have the same name as of the class but with a different set of ______.

Advertisements

प्रश्न

In constructor overloading all constructors should have the same name as of the class but with a different set of ______.

विकल्प

  • Access specifiers

  • Classes

  • Return type

  • Parameters

MCQ
रिक्त स्थान भरें
Advertisements

उत्तर

Parameters

Explanation:

In constructor overloading, all constructors have the same name but different parameter lists (they may differ in number, type, or order of parameters), so the compiler can distinguish which constructor to call. Overloading is not done by return type or access specifier.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2025-2026 (March) Official Board Paper
Advertisements
Share
Notifications



      Forgot password?
Use app×