what is constructor explain briefly? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 3

what is constructor explain briefly?

what is constructor explain briefly?

11th Apr 2019, 10:16 AM
deepak sharma
deepak sharma - avatar
2 Respuestas
+ 3
Basically the code inside the constructor gets run when a new object is created (in case u want some initial value). Little code example below: https://code.sololearn.com/c8BqR7GNEd26/?ref=app
11th Apr 2019, 11:11 AM
winterbreeze
winterbreeze - avatar