欢迎来到在线考试题库网 在线考试题库官网
logo
全部科目 > Java认证考试 > SCJP程序员认证考试

单项选择题

Which statements, when inserted at the indicated position in the following code, will cause a runtime exception when attempting to run the program?()  
class A {}  
class B extends A {}  
class C extends A {}  
public class Q3ae4 {  
public static void main(String args[]) { 
 A x = new A(); 
 B y = new B();  
C z = new C();  
// insert statement here  
}  
} 

    A.x = y;
    B.z = x;
    C.y = (B) x;
    D.z = (C) y;
    E.y = (A) y;

点击查看答案&解析

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题