toBeTopJavaer icon indicating copy to clipboard operation
toBeTopJavaer copied to clipboard

第九章9.7节如果在finally中也加一个return:以上代码的输出结果为3。应为2。

Open fanweikan opened this issue 2 years ago • 1 comments

第九章9.7节如果在finally中也加一个return:以上代码的输出结果为3。应为2。

fanweikan avatar Jun 21 '22 07:06 fanweikan

try和finally中都有return,最后只执行finally中的return语句,所以第三个示例返回值是2,书中给的3有误

LEE-cm avatar Feb 06 '23 09:02 LEE-cm