Are constructors inherited by (all) sub-classes? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Are constructors inherited by (all) sub-classes?

26th Dec 2016, 11:18 PM
A.G.
1 Answer
+ 1
no, they are not inherited, but base class constructors are called by the derive class before calling their own constructor when a object of derive class is created.
27th Dec 2016, 11:15 AM
Ravi Kumar
Ravi Kumar - avatar