Interview question Inheritance

What is the limitation of Inheritance can we create n number of child class with a single parents class ??

3 Likes

@sriv.ansh

Limitations:-

  1. Decreases the Execution Speed: loading multiple classes because they are interdependent

  2. Tightly Coupled Classes: this means that even though parent classes can be executed independently, child classes cannot be executed without defining their parent classes.

There is no limit defined for the number of classes being inherited by a single class.

2 Likes

@dsedyoda Thank You Mam :+1:

2 Likes