【发布时间】:2020-10-09 05:52:04
【问题描述】:
想象一下,try with resources 块中发生异常的情况。它将调用 close 方法来关闭资源。如果 close 方法也抛出异常会发生什么。抛出哪个异常?
【问题讨论】:
-
It’s all in the manual。甚至您在问题中使用的the tag info of
[try-with-resources]也解释了它......
标签: java exception java-8 try-with-resources