What are constructors and destructors ? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

What are constructors and destructors ?

20th Feb 2021, 4:47 AM
Shubham Karjee
Shubham Karjee - avatar
3 Respostas
+ 2
Constructor and destructor are special methods. Constructor is called at the creation of an object. Used to construct the object. Destructor is called at the deletion of an object. Used to delete the object. (C has no constructer or destructor since it doesn't have a class).
20th Feb 2021, 4:54 AM
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ - avatar