Q.
Define a class date with suitable constructor
method.
Answers
Answered by
0
Explanation:
It can be used to initialize the objects to desired values or default values at the time of object creation. It is not mandatory for the coder to write a constructor for a class. If no user-defined constructor is provided for a class, compiler initializes member variables to its default values.
Similar questions