मराठी

The name of a constructor is:

Advertisements
Advertisements

प्रश्न

The name of a constructor is:

पर्याय

  • same as the class name

  • different from the class name

  • supposed to be a keyword

  • must be written in uppercase

MCQ
Advertisements

उत्तर

same as the class name

Explanation:

In programming languages like Java, a constructor is a special function used to initialise objects. To let the computer know it is a constructor and not a regular method, its name must match the class name exactly.

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

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×