Computer Science, asked by Mitali9959, 11 months ago

When class b is inherited from class a what is the order in which the constructors of those classes are called?

Answers

Answered by sswaraj04
1

Answer:

Explanation:

I will answer this question in refrence to c++

If a class is inherited from other class then first base class constructor is executed then derived class constructor is executed

So

class b is inherited in class a

If class a object is created

then first constructor of class b will be called then constructor of class a will  be called

Hope it helps :-)

Similar questions