class Test { public int aaa() { int x = 1; try { return ++x; } catch (Exception e) { } finally { ++x; } return x; } public static void main(String[] args) { Test t = new Test(); int y = t.aaa(); System.out.println(y); } } 上の質問に回答する前に、次の問題には答えられるでしょうか? try ブロック内に return 文がある場合、 finally ブロックは return の実行時に処理されるのでしょうか。 finally が実行されるなら、いかにして return と finally の両方の実行が実現するのでしょうか。 もし答えが分からなければ、どうぞこのまま読み進め
![try { return } finally {} | POSTD](https://cdn-ak-scissors.b.st-hatena.com/image/square/4af881cdc9f32e1c1d5945c7ef2fff971e55af1f/height=288;version=1;width=512/https%3A%2F%2Fpostd.cc%2Fwp%2Fwp-content%2Fuploads%2F2015%2F05%2F106818r-500x500.png)