+ 7
What does the use of constructors?
2 Réponses
+ 24
A constructors for a class is needed so that the compiler automatically initializes an object as soon as it is created .
And if the class constructor is defined,is called/invoked whenever a program creates an abject of that class.