Java / Methods
Explain the scenario how Default Method can cause Multiple Inheritance Ambiguity Problem.
Java class can implement multiple interfaces and each interface can define default method with same method signature, therefore, the inherited methods can conflict with each other.
The above code will fail to compile with the error. To fix this class, we need to provide default method implementation.
Additionally, we may invoke default implementation provided by any of super interface by using super keyword as shown below.
More Related questions...