当捕获到exception后,就不在执行当前位置之后的方法内的语句。
import java.io.IOException;
public class Main{
public static void main(String[] args) {
try{
System.out.println("a");
if(true){
throw new Exception();
}
System.out.println("b");
}catch(IOException e1){
System.out.println("e1");
}
catch(Exception e2){
System.out.println("e2");
}
finally{
if(true){
// throw new IOException();
}
System.out.println("f");
}
}
}