Add java8-features module: runnable demos and captured output for the ankurm.com java8-features article
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
/** 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()); }
|
||||
}
|
||||
Reference in New Issue
Block a user