阅读背景:

类中的静态方法在接口中具有与默认方法相同的签名。

来源:互联网 

I have below scenario :

我有以下场景:

class C {
    static void m1() {}
}

interface I {
    default void m1() {}
}

//this will give compilation error : inherited method from C cannot hide public abstract method in I
class Main extends C implements I {

}
class C {
 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: