声明、抛出和捕获异常 methodl() 4444444444444444 method2 ( throws Exception claim exception if (an error occurs) try catch exception throw new Exception(); throw exception invoke method2; } catch (Exception ex) Process exceptio; ©2006计算机系杨厚群 All rights lefts reserved. ©2006 计算机系 杨厚群 All rights & lefts reserved. 声明、抛出和捕获异常 method1() { try { invoke method2; } catch (Exception ex) { Process exception; } } method2() throws Exception { if (an error occurs) { throw new Exception(); } } catch exception throw exception claim exception