在Sun
Tutorial中有这样一句话:The finally
block always executes
when the try
block exits. This ensures that
the finally
block is executed even if an unexpected
exception occurs. 看来finally块中的语句应该是总会执行的。
先来写一个最常见的写法:
参考:
2.
finally块中的代码一定会执行吗?,布布扣,bubuko.com
原文:http://www.cnblogs.com/xingele0917/p/3634547.html