一个让人困扰的问题
interface Type1 {
void f() throws CloneNotSupportedException;
}
interface Type2 {
void f() throws InterruptedException;
}
interface Type3 extends Type1, Type2 {
}
public class Arcane3 implements Type3 {
public void f() {
System.out.println("Hello world");
}
public static void main(String[] args) {
Type3 t3 = new Arcane3();
t3.f();
}
}
这个程序编译过了。。也能执行出结果。。
有点颠覆我以前的理解了 Type3怎么能继承两个 望解释详细点
还有。。这个里面异常的问题也望能解释解释