How do constructors work | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How do constructors work

30th Nov 2017, 8:12 AM
tyson orenge
tyson orenge - avatar
3 Answers
0
Constructors are the method which are invoked as soon as the object is created for any class
17th Dec 2017, 9:51 AM
Rajat Gupta
Rajat Gupta - avatar
+ 2
Hi, Constructor was calling when u create a object with type your class. I hope this help.
30th Nov 2017, 8:15 AM
stKhaDgar
stKhaDgar - avatar
0
Are invoked when an object is created and used to initialize them
30th Nov 2017, 8:14 AM
tyson orenge
tyson orenge - avatar