Advertisements
Advertisements
प्रश्न
Which of the following statements is false?
पर्याय
A constructor has same name as class name.
A constructor returns initial value.
A constructor is called while creating an object.
A constructor is not used for arithmetical and logical operations.
MCQ
उत्तर
A constructor returns initial value.
Explanation:
A constructor does not return any value, including void. It is called automatically to set the object's state at object creation, but it returns nothing.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?