public class test {
public static void main(String[] args) {
try {
System.exit(0);
System.out.println("hello");
} finally {
System.out.println("In the finally block");
}
}
}
System.exit(0)会跳过finally块的执行,什么都不输出。
public class test {
public static void main(String[] args) {
try {
System.exit(0);
System.out.println("hello");
} finally {
System.out.println("In the finally block");
}
}
}
System.exit(0)会跳过finally块的执行,什么都不输出。