1请阅读下列程序代码,然后将程序的执行结果补充完整。 public class throwsExcepfion{ static void Proc(int se1) throws ArithmeticException,Arr

admin2010-07-28  22

问题 1请阅读下列程序代码,然后将程序的执行结果补充完整。
public class throwsExcepfion{
      static void Proc(int se1)
         throws ArithmeticException,ArraylndexOutOfBoundsException {
         System.out.println("in Situation"+se1);
         if(se1==0){
            System.out.println("no Exception caught");
            return;
         }else if(se1==1){
            int iArray[]=new int[4];
            iArray [1]=3;
         }
       }
      public static void main(String args[])[
         try{
            Proc(0);
            Proc(1);
         } catch(ArraylndexOutOfBoundsException e) {
         System.out.println("Catch"+e);
         }finally{
            System.out.println("in Proc finally");
         }
       }
    }
    执行结果:
    In Situation()
    no ExcepbOn cauSht
   【  】
   in Proc findly

选项

答案In Situation1

解析
转载请注明原文地址:https://jikaoti.com/ti/CDH0FFFM
0

随机试题
最新回复(0)