Question: If Y is a derived class of X , when an object of Y is created, Y s constructor will be invoked first, then X
If Y is a derived class of X when an object of Y is created,
Ys constructor will be invoked first, then Xs constructor
Xs constructor will be invoked first, then Ys constructor
Only Ys constructor will be invoked
Only Xs constructor will be invoked
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
