Java 例外處理,觀念題。 Exception { try catch} //由main方法,搭配下面三小題目 詢問輸出結果。 public class ExceptionFlow2 { public static void main(String[] args) { try { method(); } catch (Exception e) { System.out.println("3 - Exception handling in main()"); } } // 題目1 // public static void method() throws Exception { // try { // System.out.println("1 - in method()"); // throw new Exception(); // } catch (Exception e) { // System.out.println("2 - Exception handling in method()"); // } // } // 題目2 // public static void method() throws Exception { // try { // System.out.println("1 - in method()"); // throw new Exception(); // } catch (RuntimeException e) { // System.out.println("2 - Exception handling in method()"); // } // } // 題目3 public static void method() throws Exception { try { System.out.println("1 - in method()"); throw new Exception(); ...