English

For which purpose a constructor is used? - Computer Applications

Advertisements
Advertisements

Question

For which purpose a constructor is used?

Options

  • To initialise the instance variables 

  • To provide the instance variables

  • To organise the instance variables

  • To simplify the instance variables

MCQ

Solution

To initialise the instance variables

Explanation:

A constructor sets default or user-defined settings for data members when an object is created.

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. 1. | Page 417
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×