我的意思是:
interface B {...}
interface A extends B {...} // allowed
interface A implements B {...} // not allowed
我google google了,我发现this:
implements denotes defining an implementation for the methods of an interface. However interfaces have no implementation so that’s not possible.
但是,接口是一个100%的抽象类,抽象类可以实现接口(100%抽象类),而不实现其方法。当它定义为“接口”时有什么问题?
详细来说,
interface A {
void methodA();
}
abstract class B implements A {} // we may not implement methodA() but allowed
class C extends B {
void methodA(){}
}
interface B implements A {} // not allowed.
//however, interface B = %100 abstract class B