मराठी

Answer the following in brief. Give a program code example wherever applicable. Can constructors be overloaded?

Advertisements
Advertisements

प्रश्न

Answer the following in brief. Give a program code example wherever applicable.

Can constructors be overloaded?

लघु उत्तर
Advertisements

उत्तर

  • Flexible Object Creation: It allows a class to have multiple constructors with the same name but different sets of parameters (differing in number, data type, or order of arguments).
  • Multiple Configurations: It enables you to initialize different objects of the same class in various ways depending on the data available at that moment.
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 4: Constructors - Exercises [पृष्ठ ११५]

APPEARS IN

रूपा पंडित Computer Applications [English] Class 10 ICSE
पाठ 4 Constructors
Exercises | Q 3. (iv) | पृष्ठ ११५
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×