waltermilner

Untitled

Oct 12th, 2018
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1. public class Test implements I1, I2 {
  2.   // 'class Test inherits unrelated defaults for method() from types I1 and I2'
  3.  
  4.   public static void main(String[] args) {
  5.    
  6.   }
  7.  
  8. }
  9.  
  10. interface I1
  11. {
  12.   default void method()
  13.   { System.out.println("Interface 1");}
  14. }
  15.  
  16. interface I2
  17. {
  18.   default void method()
  19.   { System.out.println("Interface 2");}
  20. }
Advertisement
Add Comment
Please, Sign In to add comment