申論 4請回答下列關於例外處理(exception handling)的問題:㈠許多程式語言(例如:C++、Java 與JavaScript)都有例外處理機制:try-catch 敘述與throw 敘述。請簡述這兩個敘述的差別。(8 分)㈡下列Java 程式的執行結果為何?(12 分)class FooException extends Exception {}class ExceptionQuestion {public void aMethod() throws FooException {try {System.out.println( "In aMethod" );throw new FooException();} catch ( FooException error ) {System.out.println( "in first catch" );throw new FooException();} finally {System.out.println( "Finally" );}}public static void main( String[] args ) {try {System.out.println( "Start" );ExceptionQuestion x =new ExceptionQuestion();x.aMethod();System.out.println( "After method" );} catch ( FooException e1 ) {System.out.println( "In handler 1" );} catch ( Exception e2 ) {System.out.println( "In handler 2" );}System.out.println( "End" );}}(請接第四頁)101年公務人員高等考試三級考試試題 代號:36240第 四 頁類 科: 資訊處理科 目: 程式語言