当前位置: 首页 > 计算机二级 > 计算机二级模拟试题 > 2020年计算机二级JAVA考试每日一练(5月27日)

2020年计算机二级JAVA考试每日一练(5月27日)

更新时间:2020-05-27 13:30:36 来源:环球网校 浏览19 收藏5
摘要 备考全国计算机二级JAVA考试的小伙伴们,复习的都怎么样了呢?环球网校小编发布了2020年计算机二级JAVA考试每日一练供大家参考复习,小伙伴们快来做一做,测试一下自己吧!了解更多全国计算机二级JAVA备考资料敬请关注环球网校计算机二级频道。

2020年计算机二级JAVA考试每日一练(5月27日)

1.栈中允许进行插入和删除的一端称为( )。

A.栈顶

B.栈底

C.栈端

D.栈尾

答案:A

2.下面程序段的输出结果是( )。

public class Test{

public static void main(String args[]){

int i=1:

switch(i){

case0:

System.OUt.println("0");

break;

casel:

System.out.println("1");

case2:

System.OUt.println("2");

break;

default:

System.out.println("default");

}

}

}

A.01

B.12

C.10

D.21

答案:B

3.Frame默认的布局管理器是( )。

A.FlowLayout

B.BorderLayout

C.GridLayout

D.UpLayout

答案:B

4.在Java语言中,ObjectOutputStream是指( )。

A.字节流

B.字符流

C.对象输出流

D.数据流

答案:C

5.请阅读下列程序代码,然后将程序的执行结果补充完整。横线处应填写的内容是( )。

程序代码:

public class throwsExeeption{

static void Proc(intsel)

throws Arithmetic Exception,Array Index Out Of

Bounds Exception{

System.out.println("InSituation"+sel);

if(sel= =0){

System.OUt.println("noException caught");

return;

}

else if(sel= =l){

int iArray[]=newint[4];

iArray[1]=3;

}

}

public static void main(String args[]){

try{

Proe(O);

Proc(1);

}

catch(Array Index Out Of Bounds Exception e){

System.out.println("Catch"+e);

}

finally{

System.out.println("inProcfinally"):

}

}

}

执行结果:

In Situation 0

no Exception caught

in Proc finally

A.In Situation l

B.In Situation

C.with Catch

D.int iArray l

答案:A

更多2020年计算机二级JAVA考试每日一练试题,请继续关注环球网校计算机二级频道。需要及时了解考试动态的小伙伴可“ 免费预约短信提醒”届时环球网校会及时为大家推送2020年计算机二级考试相关信息提醒。环球网校友情提示:对于想要参加计算机二级考试的小伙伴们,环球网校特地为您准备了计算机二级考试资料,如有需要请点击文章下方“免费下载>>>计算机二级考试资料”下载学习。

编辑推荐

分享到: 编辑:环球网校

资料下载 精选课程 老师直播 真题练习

计算机二级资格查询

计算机二级历年真题下载 更多

计算机二级每日一练 打卡日历

0天
累计打卡
0人
打卡人数
去打卡

预计用时3分钟

计算机二级各地入口
环球网校移动课堂APP 直播、听课。职达未来!

安卓版

下载

iPhone版

下载

返回顶部