try...catch...finally语句

1、当try中或者catch中有return时,会先执行finally中的代码,再执行return语句。

有一种情况比较特殊,就是代码中有System.exit(1)时,return才不会被执行。

猜你喜欢

转载自blog.csdn.net/chenzuen113113/article/details/80928035