搜题
问题   更新时间2023/4/3 12:59:00

class Ex extends Exception {}
public class AlwaysFinally {
public static void main(String[] args) {
System.out.println(
"Entering first try block");
try {
System.out.println(
"Entering second try block");
try {
throw new Ex();
} finally {
System.out.println(
"finally in 2nd try block");
}
} catch(Ex e) {
System.out.println(
"Caught Ex in first try block");
} finally {
System.out.println(
"finally in 1st try block");
}
}
}
上述代码执行后的结果是?

您的答案: Entering first try block Entering second try block finally in 2nd try block Caught Ex in first try block finally in 1st try block
王老师:19139051760(拨打)