确实不建议在catch语句添加return,以下代码执行之后,t.n是多少呢? public static Test maybe() {
确实不建议在catch语句添加return,以下代码执行之后,t.n是多少呢? public static Test maybe() { Test t = new Test(); try { t.n++; t.n=t.n/0; } catch (Exception e) { t.n++; return t; } finally { t.n++; System.out.println(t.n); } return t;
A、1
B、2
C、3
D、0