logo - 刷刷题
下载APP
【单选题】

下列程序运行的结果是() public class zcsoft { public static void main (String[] args) { int[] text={2,0,0,7,0,6} try { System.out.print(text[5]+“ ”); System.out.print(text[6]+“ ”); System.out.print(text[0]+“ ”); }catch(Exception e) { System.out.print(“数组下标越界 ”); } } finally { System.out.println(“释放资源”) ;} }

A.
5 6 2
B.
6 数组下标越界 释放资源
C.
6 数组下标越界
D.
6
举报
参考答案:
参考解析:
.
刷刷题刷刷变学霸
举一反三

【多选题】数组在使用时下标越界是 _________ 。

A.
不允许的
B.
可以的
C.
有规定的
D.
没规定的

【单选题】下列常见的系统定义的异常中,数组越界异常是( )。

A.
ArrayIndexOutOfBoundsException
B.
IOException
C.
NullPointerException
D.
ArithmeticException