Computer Science, asked by prithadas2004, 10 months ago

Can a program run without declaring constructor?​

Answers

Answered by Pikachu07
0

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.

Answered by Aarti20dec
1

Answer: Yes it is possible. It is not compulsory to declare a constructor for run a class.

Explanation:

Similar questions