欢迎来到易学考试网 易学考试官网
全部科目 > Java认证考试 > SCJP程序员认证考试

单项选择题

public class X { 
public static void main(String [] args) { 
try { 
badMethod(); 
System.out.print(“A”); 
} 
catch (Exception ex) { 
System.out.print(“C”); 
} 
finally { 
System.out.print(“B”); 
} 
System.out.print(“D”); 
} 
public static void badMethod() { 
throw new Error(); 
} 
} 
What is the result?()  

    A. ABCD
    B. Compilation fails.
    C. C is printed before exiting with an error message.
    D. BC is printed before exiting with an error message.
    E. BCD is printed before exiting with an error message.

点击查看答案&解析

相关考题

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

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