Advertisements
Advertisements
Question
State two features of a constructor.
Short Answer
Solution
- A constructor has the same name as the class name.
- A constructor is used for initializing the data members.
shaalaa.com
Is there an error in this question or solution?