接口实现问题
public class B implements I1, I2 {
public void m1() {
System.out.println("Hello");
}
public static void main(String[] args) {
B tc = new B();
((I1) tc).m1();//若把这里的I1去掉,即改为tc.m1();那么他到底实现的是哪个接口?
}
}
interface I1 {
int VALUE = 1;
void m1();
}
interface I2 {
int VALUE = 2;
void m1();
}
public void m1() {
System.out.println("Hello");
}
public static void main(String[] args) {
B tc = new B();
((I1) tc).m1();//若把这里的I1去掉,即改为tc.m1();那么他到底实现的是哪个接口?
}
}
interface I1 {
int VALUE = 1;
void m1();
}
interface I2 {
int VALUE = 2;
void m1();
}