0
Implementing multiple inheritance and implenting interface is same or not???
in java implementing multiple inheritance and implementing interface is same ...
2 Antworten
0
No. Interface is just a declaration. It has no code. When you inherit an interface you have to implement all it's methods. That cause code replicate.
Multiple inheritance allows to inherit complete class and reuse it's functionality without code duplication. For example C++ has standard class std::enable_shared_from_this that could be used in the multiple inheritance to change creation behavior. You don't need to implement something special after inheritance, but can use the result of it.