Advertisement
DulcetAirman

maximally specific

Oct 9th, 2015
196
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package ch.fhnw.claudemartin;
  2.  
  3. abstract class A implements B {
  4. }
  5.  
  6. interface B {
  7.  
  8.     default Object abc(final Integer i) {
  9.         System.out.println("Interface B");
  10.         return 1;
  11.     }
  12. }
  13.  
  14. interface C {
  15.  
  16.     default Object abc(final Object i) {
  17.         System.out.println("Interface C");
  18.         return 2;
  19.     }
  20. }
  21.  
  22. public class Test extends A implements C {
  23.  
  24.     public static void main(final String[] args) {
  25.         final Test t = new Test();
  26.         t.abc("foo");
  27.         t.abc(123);
  28.     }
  29. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement