In many books it is written that interfaces are a replacement of multiple inheritance, but I don’t find any similarity between both of them.
Inheritance is mostly important for re-usability of code and functionality and multiple inheritance was helping to re-use code from more than one class, but in interface I didn’t find any such feature except that a class can inherit from more than one interface.
Interface is just declaration of functions/methods and it didn’t contain any implementation part by itself, so class which are inheriting this interface should have to write their own implementation code.
So I don’t feel any re-usability of code in case of interface.
Is any document or link which will clear my doubts with you answer please share.
Regarding reusability of code, you are right. In that respect, multiple interfaces are no replacement of multiple inheritance.
However, there’s another aspect of inheritance: it establishes an
is-arelasionship between the base- and sub-class. So a class inheriting multiple super-classes can act as any of them. In this respect, interfaces serve as a valid replacement, e.g. a method accepting an interface will also accept any class implementing that interface, in the same way as a method will accept any class derived from the excpected class. But as you stated, each class has to implement the interface methods by their own.Example: