मराठी

A constructor gets activated when ______.

Advertisements
Advertisements

प्रश्न

A constructor gets activated when ______.

पर्याय

  • it is invoked

  • an object of the class is created

  • the program is compiled

  • never

MCQ
रिकाम्या जागा भरा
Advertisements

उत्तर

A constructor gets activated when an object of the class is created.

Explanation:

A constructor is a special method of a class that is automatically called when an object is created. It is mainly used to initialize the data members of the object.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 4: Constructors - Exercises [पृष्ठ ११४]

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×