使用具有相同方法的两个接口实现多重继承

kar*_*487 0 java oop multiple-inheritance

虽然我试图访问两个接口中给出的相同方法,但我理解多重继承的概念.例:-

interface Interface1{ 
       int show();
       void display();
}
Run Code Online (Sandbox Code Playgroud)
interface Interface2 {
int show();
void display();
}
Run Code Online (Sandbox Code Playgroud)
class Impl implements Interface1, Interface2 {
       // how to override show() and display() methods such that 
       // i could access both the interfaces
}
Run Code Online (Sandbox Code Playgroud)

Rah*_*kar 5

由于接口没有方法定义.你覆盖哪个界面的show方法无关紧要.