public class InnerInterfaces2 { public static void main(String[] args) { new Test().new Test2(); new Test3().new Test2(); new Test4(); } } class Test { public static final int x=2; public static interface Value { int y = 10; } public static interface Value2 { int y = 11; } public class Test2 implements Value { Test2() { System.out.println(x+y); } } } class Test3 extends Test {} class Test4 implements Test.Value2 { Test4() { System.out.println(y); } } /* Output: 12 12 11 */