English

A constructor is always: - Computer Applications

Advertisements
Advertisements

Question

A constructor is always: 

Options

  • Private

  • Protected

  • Secure

  • Public

MCQ

Solution

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
  Is there an error in this question or solution?
Chapter 7: Constructors - EXERCISES [Page 417]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 7 Constructors
EXERCISES | Q I. 3. | Page 417
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×