写出下面程序标记为1~6的执行顺行 public class UsingException { public static void main(String[] args) { try { method1();//1 } catch(Exception e) { System.out.println(e.getMessage());//2 } finally { System.out.println("Program is end!");//3 } } public static void method1()throws Exception{ method2();//4 } public static void method2()throws Exception{ method3();//5 } public static void method3()throws Exception{ throw new Exception("Exception thrown in method3");//6 } }
时间: 2023-03-16 19:43:32 浏览: 133
1、method1();2、e.getMessage();3、"Program is end!";4、method2();5、method3();6、"Exception thrown in method3"。
阅读全文