finally 的执行时机 — 程序设计填空题
题目
有如下代码片段:
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,则返回值变为____。