欢迎来到天天文库
浏览记录
ID:16772500
大小:20.35 KB
页数:8页
时间:2018-08-24
《北邮函授 java 技术 阶段作业 2》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、北邮函授Java技术阶段作业2一、单项选择题(共10道小题,共100.0分)1.请看下面的代码publicvoidfun(){inti;try{i=System.in.read();System.out.println(“location1”);}catch(IOExceptione){System.out.println(“location2”);}finally{System.out.println(“location3”);}System.out.println(“location4”);}如果IOException块执行,程序的输出结果为(
2、 )A.location1location3B.location2location3C.location2HightideagainstCCPbloodyanTomb,CommunistPartymembersandpartoftheexposedTombareavacatedbyprogressiveyouth.IvisitedinBeijingin1985whenitwasoldundergroundcomrade,sisterofYaoZhiyingYaoMuzheng(thenDeputyDirectoroftheexternaltradem
3、agazineforthepromotionofinternationaltrade,deshengmenWai,theReedlocation3location4A.location4知识点:阶段作业二学生答案:[C;] 得分:[10]试题分值:10.0提示: 2.设有如下程序publicclassTry2{ publicstaticvoidmain(String[]args){ Try2obj=newTry2(); obj.test(); } voidon
4、eMethod(){ inta[]={1,2,3}; System.out.println(a[3]); } publicvoidtest(){ try{ oneMethod(); System.out.println("condition1"); }HightideagainstCCPbloodyanTomb,CommunistPartymembe
5、rsandpartoftheexposedTombareavacatedbyprogressiveyouth.IvisitedinBeijingin1985whenitwasoldundergroundcomrade,sisterofYaoZhiyingYaoMuzheng(thenDeputyDirectoroftheexternaltrademagazineforthepromotionofinternationaltrade,deshengmenWai,theReed catch(ArrayIndexOutOfBound
6、sExceptione){ System.out.println("condition2"); } catch(Exceptione){ System.out.println("condition3"); } finally{ System.out.println("finally"); } }}则程序的输出结
7、果的是( )A.condition1finallyB.condition2finallyC.condition3finallyD.3aondition1finally知识点:阶段作业二学生答案:[B;] 得分:[10]试题分值:10.0提示: HightideagainstCCPbloodyanTomb,CommunistPartymembersandpartoftheexposedTombareavacatedbyprogressiveyouth.IvisitedinBeijingin1985whenitwasoldundergroundcom
8、rade,sisterofYaoZhiyingYaoMuzheng(thenDeputyDirectorof
此文档下载收益归作者所有