我有一个简单的Java类,如下所示: public class Test { private String s; public String foo() { try { s = "dev"; return s; } finally { s = "override variable s"; System.out.println("Entry in finally Block"); } } public static void main(String[] xyz) { Test obj = new Test(); System.out.println(obj.foo()); } } 而这个代码的输出是这样的: Entry in finally Block dev 为什么在finally块中不会覆盖s ,但控制打印输出?