Implementing Super and sub interfaces both in a class(class A implements SuperInterface, SubInterface)
问题 interface A { public void doSomething(); } interface B extends A { public void doSomethingElse(); } public class AClass implements A, B { public void doSomething() {} public void doSomethingElse() {} } Why does Java permit such a declaration? What's the use of implementing both interfaces when same thing can be achieved by implementing the SubInterface (B)? 回答1: I think the "why" question can only be answered by Java designers. One reason might be that it permits retrofitting extends A to B