下载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
题目标签:
下标越界
释放资源
越界
举报
如何制作自己的在线小题库
参考答案:
参考解析:
刷刷题刷刷变学霸
举一反三
【判断题】finally通常用于释放资源。
A.
正确
B.
错误
查看完整题目与答案
【单选题】研究下面的Java代码:publicclasstestException{publicstaticvoidmain(Stringargs[]){inta[]={0,1,2,3,4};intsum=0;try{for(inti=1;i<6;i++)sum=sum+a[i];System.out.println("sum="+sum);}catch(ArrayIndexOutOfBoundsEx...
A.
10数组越界程序结束
B.
10程序结束
C.
数组越界程序结束
D.
程序结束
查看完整题目与答案
【判断题】每次操作数据库结束后都要关闭数据库,释放资源,包括关闭ResultSet、Statement和Connection等资源。
A.
正确
B.
错误
查看完整题目与答案
【多选题】数组在使用时下标越界是 _________ 。
A.
不允许的
B.
可以的
C.
有规定的
D.
没规定的
查看完整题目与答案
【简答题】无证勘查、越界勘查的应承担什么责任?
查看完整题目与答案
【单选题】A、B是同村邻居,A越界建房侵入B的宅基地,A的行为侵犯了B的
A.
相邻权
B.
宅基地使用权
C.
房屋所有权
D.
宅基地所有权
查看完整题目与答案
【判断题】通常所说的'存储保护'的基本含义是防止程序间相互越界访问。()
A.
正确
B.
错误
查看完整题目与答案
【单选题】进程P1使用资源情况:申请资源S1…申请资源S2…释放资源S1;进程P2使用资源情况:申请资源S2…申请资源S1…释放资源S2,系统并发执行进程P1、P2,系统将()。
A.
必定产生死锁
B.
可能产生死锁
C.
不会产生死锁
D.
P1 先到达就不会产生死锁
查看完整题目与答案
【单选题】下列常见的系统定义的异常中,数组越界异常是( )。
A.
ArrayIndexOutOfBoundsException
B.
IOException
C.
NullPointerException
D.
ArithmeticException
查看完整题目与答案
【简答题】无证勘查、越界勘查的应承担什么责任?
查看完整题目与答案