第一个:- /*
- * 写出程序结果
- */
- package ExceptionDemo;
- public class ExceptionDemo9
- {
- public static void jun()
- {
- try
- {
- throw new Exception();
- }
- finally
- {
- System.out.println("finally");
- }
- }
- public static void main(String[] args) {
- try
- {
- jun();
- System.out.println("MAIN");
- }
- catch(Exception e )
- {
- System.out.println("catch");
- }
- System.out.println("结束");
- }
- }
-
复制代码 第二个:- /*
- * 写出程序结果
- */
- package ExceptionDemo;
- public class ExceptionDemo9
- {
- public static void jun()throws Exception
- {
- try
- {
- throw new Exception();
- }
- finally
- {
- System.out.println("finally");
- }
- }
- public static void main(String[] args) {
- try
- {
- jun();
- System.out.println("MAIN");
- }
- catch(Exception e )
- {
- System.out.println("catch");
- }
- System.out.println("结束");
- }
- }
-
复制代码 答案有点 接受不了 大家的答案?? 赐教 谢谢 |
|