If I inherit derived class from base class as private what will be the order of constructor and destructor? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 1

If I inherit derived class from base class as private what will be the order of constructor and destructor?

30th Aug 2016, 4:53 PM
Sunitha Ganti
Sunitha Ganti - avatar
2 Respuestas
+ 3
They are called in the same order: Base constructor then derived one Derived destructor then base one
30th Aug 2016, 9:32 PM
Zen
Zen - avatar
0
tq
31st Aug 2016, 3:26 PM
Sunitha Ganti
Sunitha Ganti - avatar