Java 寫道 public class Test6 { /** * try {}裏有一個return語句,那麼緊跟在這個try後的finally {}裏的 * code會不會被執行,何時被執行,在return前仍是後? * @return */ public String Test1() { String str = "真的在"; try { str = str+"return前輸出?"; return str; } finally { str = "finally在return前輸出"; System.out.println(str); } } public static void main(String[] args) { Test6 t = new Test6(); System.out.println(t.Test1()); } }