Advertisements
Advertisements
प्रश्न
For which purpose a constructor is used?
विकल्प
To initialise the instance variables
To provide the instance variables
To organise the instance variables
To simplify the instance variables
MCQ
उत्तर
To initialise the instance variables
Explanation:
A constructor sets default or user-defined settings for data members when an object is created.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?