catch之后的代码什么时候执行

1.若catch(){}块中,如果有throw 语句,则,try{}catch(){} finally{}块之外的代码不执行;

  否则,执行。

2.try{}中有异常,则异常下面代码不执行。

3.finally{}中代码必执行。

 catch可以省略,try的形式有三种:

try-catch

try-finally

try-catch-finally
catch和finally语句不能同时省略!
原文地址:https://www.cnblogs.com/albertshine/p/13257284.html