问题:
public class X {
public static void main(String [] args) {
try {
badMethod();
System.out.print(“A”);
}
catch (Exception ex) {
System.out.print(“B”);
}
finally {
System.out.print(“C”);
}
System.out.print(“D”);
}
public static void badMethod() {}
}
What is the result?()
A . AC
B . BD
C . ACD
D . ABCD
E . Compilation fails.
public class X {
public static void main(String [] args) {
try {
badMethod();
System.out.print(“A”);
}
catch (Exception ex) {
System.out.print(“B”);
}
finally {
System.out.print(“C”);
}
System.out.print(“D”);
}
public static void badMethod() {}
}
What is the result?()
● 参考解析
本题暂无解析
相关内容
相关标签