-->
当前位置:首页 > 题库

单选题:下面程序在fun( )方法当出现数组下标超过界限的情况下,被ArrayIndexOutOfBoundsException类型的异

Luz5年前 (2021-06-19)题库1860
下面程序在fun( )方法当出现数组下标超过界限的情况下,被ArrayIndexOutOfBoundsException类型的异常对象e所捕获。程序输出结果是:(   )。
```
public void test() {
    try {
       fun();
       System.out.print("情况1");
     } catch (ArrayIndexOutOfBoundsException e) {
         System.out.print("情况2");
     } catch (Exception e) {
          System.out.print("情况3");
     } finally {
         System.out.print("finally");
     }
 }
```



A.情况1

B.情况2

C.情况2finally
D.情况3finally



答案:C