try{ ...}catch(Exception e){ e.printStackTrace();}

try{语句1;语句2;}catch(Exception e1){ ...}catch(Exception e2){ ...}

当try语句1遇到异常,将不会执行try后面的语句
catch可以有多个,多个catch时应注意子类错误在前,父类错误在后,否则捕获的异常都会到父类错误里FileNotFoundException e就是IOException e的子类
所以FileNotFoundException e应写在前面

try{ ...}catch(Exception e3){ ...}finally{ ...}

finally只能有一个,并且finally内的代码最后都会执行