Duplicate default methods
// Duplicate default methods named abc with the parameters () and () are inherited from the types C and B
abstract class A {
}
interface B {
default void abc() {
System.out.println("Interface B");
}
}
interface C {
default void abc() {
System.out.println("Interface C");
}
}
public class Test extends A implements B, C {
public static void main(final String[] args) {
final Test t = new Test();
t.abc();
}
}
Comments
0 B
|👍
/👎