單項(xiàng)選擇題

class A {  
public String toString () {  
return “4”;  
}  
}  
class B extends A {  
8. public String toString () {  
return super.toString() + “3”;  
}  
}  
public class Test {  
public static void main(Stringargs) {  
System.out.printIn(new B());  
}  
}  
What is the result?()  

A. Compilation succeeds and 4 is printed.
B. Compilation succeeds and 43 is printed.
C. An error on line 9 causes compilation to fail.
D. An error on line 14 causes compilation to fail.
E. Compilation succeeds but an exception is thrown at line 9.

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