हिंदी

A constructor is always: - Computer Applications

Advertisements
Advertisements

प्रश्न

A constructor is always: 

विकल्प

  • Private

  • Protected

  • Secure

  • Public

MCQ

उत्तर

Public

Explanation:

Constructors are typically marked as public so that objects of a class can be generated from outside the class. A public constructor allows other classes to access the constructor and make instances of the class.  

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 7: Constructors - EXERCISES [पृष्ठ ४१७]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
अध्याय 7 Constructors
EXERCISES | Q I. 3. | पृष्ठ ४१७
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×