Files
javademos/java8-features/broken/DiamondError.java
T

8 lines
365 B
Java

/** Fails to compile on purpose: two default methods with the same signature and no override. */
public class DiamondError {
interface A { default String move() { return "a"; } }
interface B { default String move() { return "b"; } }
static class C implements A, B { }
public static void main(String[] args) { System.out.println(new C().move()); }
}