程序设计 填空题 较难 ★ 精品

finally 的执行时机 — 程序设计填空题

Java 程序设计(大学通用) 异常处理 AI 三重审校通过

题目
有如下代码片段: public static int test() { int r = 0; try { throw new RuntimeException(); } catch (RuntimeException e) { r = 5; return r; } finally { r = 10; } } 调用 test() 的返回值为____。若将 finally 块中语句改为 return r,则返回值变为____。