What are some potential efficiency disadvantages of having very deep inheritance trees, that is, a large set of classes, A, B, C, and so on, such that B extends A, C extends B, D extends C, etc.?
Drawbacks of deep inheritance in java:
1. One of the drawbacks of deep inheritance is that the classes (parent and child) become tightly coupled.
As a result, when we change the code of the parent class, all of the child classes inheriting from the parent class will be affected, and they cannot function independently.
2. The compiler will take longer to figure out which method is overridden if the method signature is overridden in each class.
3. Classes that extend one another become disorganized.
4. Moreover, it does not support multiple inheritance in classes, but it can be done through interfaces.
Deep inheritance is a bad practise,