假设我有 2 个接口
interface A {
public static final int CONSTANT1 = 6;
}
interface B {
public static final int CONSTANT1 = 7;
}
class MYclass implements A, B {
public static void main(String[] args) {
System.out.println(CONSTANT1);//<- ??
}
}
哪个常量会被打印出来还是编译错误?