fork download
  1. class Main {
  2.  
  3. public static void main(String[] args) {
  4. call((B) (s) -> System.out.println(s));
  5. }
  6.  
  7. static void call(A a) {
  8. a.call(7, 42, "Hello World!");
  9. }
  10.  
  11. static interface A {
  12.  
  13. void call(int x, int y, String s);
  14.  
  15. }
  16.  
  17. static interface B extends A {
  18.  
  19. void call(String s);
  20.  
  21. default void call(int x, int y, String s) {
  22. call(s);
  23. }
  24.  
  25. }
  26.  
  27. }
Success #stdin #stdout 0.13s 4386816KB
stdin
Standard input is empty
stdout
Hello World!