Java doesn’t support multiple inheritance because if two classes have same function name but different implementation and if a third class inherits these two classes and if it wants to use the method, then it will create a confusion on which method should be called. So java uses multiple interfaces concept. But my doubt is if two multiple interfaces also have the same function name but different implementation and if a third class implements these two interfaces and when it provides implementation to that method then is it not a problem, please explain?
Java doesn’t support multiple inheritance because if two classes have same function name but
Share
A clash between two interfaces occurs when two methods have the same parameters but a different return type.
Example:
It is not possible to implement both these interfaces.