interface I { String getValue(); } interface J extends I { } class X implements I { public String getValue() {return "X";} } class Y implements J { public String getValue() {return "Y";} } class Test { void foo(J j) { String s = j.getValue(); } }