單項(xiàng)選擇題

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;

題目列表

你可能感興趣的試題

微信掃碼免費(fèi)搜題