• finally语句块中仅修改返回变量,不会影响最终的返回结果
  • finally语句块中有返回语句,会覆盖之前的返回值

cmd 反编译一下即可知晓

javac finallyTest.java javap -c finallyTest.class

finally语句块对返回的影响_java

finally语句块对返回的影响_java_02

finally语句块对返回的影响_反编译_03 I have a dream : Sandy beach B-J-N. finally语句块对返回的影响_返回结果_04