欢迎来到天天文库
浏览记录
ID:20450300
大小:99.58 KB
页数:17页
时间:2018-10-13
《java软件开发工程师笔试题 》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、java软件开发工程师笔试题选择题1:Inthefollowingcode,whichistheearlieststatement,wheretheobjectoriginallyheldine,maybegarbagecollected:classTest{2.publicstaticvoidmain(Stringargs[]){3.Employeee=newEmployee(〃Bob〃,48);4.0;5.(0);6.e=null:7.e=newEmployee(〃Denise〃,36);8.0;9.(0);10.}11.}OnlyOne:Inthe
2、followingcode,whichistheearlieststatement,wheretheobjectoriginallyheldine,maybegarbagecollected:classTest{2.publicstaticvoidmain(Stringargs[]){2.Employeee=newEmp1oyee(〃Bob〃,48);3.0;4.(0);5.e=null;7.e=newEmp1oyee("Denise〃,36);8.0;9.(0);10.}11.}OnlyOne:1011782:Exhibit:1.publicelass
3、test(2.privatestaticintj=0;3.4.privatestaticbooleanmethodB(intk)(5.j+二k;6.returntrue;6.)7.8.publicstaticvoidmethodA(inti){9.booleanb:10.b=ill.b=il2.)13.14.publicstaticvoidmain(Stringargs[]}(15.methodA(0);16.(j):17.)18.)Whatistheresuit?programprints“0”programprints“4’’programprint
4、s“8”programprints“12”3:Whatiswrittentothestandardoutputgiventhefollowingstatement:(4
5、7);Se1ecttherightanswer:4:SelectvalididentifierofJava:Selectvalididentifierofjava:A.%passwd_gameC.$charge5:设有变量说明语句inta=1,b=0;则执行以下程序段的输出结果为0。switch(a){case1:switch(b){case0:printf(〃氺氺0氺氺〃);break
6、;easel:printf(〃氺氺1氺氺〃);break;}case2:printf(〃氺氺2氺氺〃);break;}printf(//z/):B.氺氺0氺氺氺氺2氺氺C.氺氺0氺氺氺氺1氺氺氺氺2氺氺D.有语法错误6:Inthefollowingpiecesofcode,whichonewillcompilewithoutanyerror?sbl=z/abcd/z;b=newBoolean(〃abcd〃);:byteb=255;fl=;7:Whatistheresultwhenyoucompileandrunthefollowingeode?publi
7、cclassThrowsDemo{staticvoidthrowMethod(){(〃InsidethrowMethod,);thrownewIllegalAccessException("demo");}publicstaticvoidmain(Stringargs口)throwMethodO:catch(IllegalAccessExceptione)("CaughV+e);Choices:Whatistheresultwhenyoucompileandrunthefollowingeode?publicclassThrowsDemostaticvo
8、idthrowMethod()(〃InsidethrowMethod,);thrownewlllegalAccessException("demo");publicstaticvoidmain(Stringargs口)throwMethod():catch(IllegalAccessExceptione)("CaughV'+e);Choices:errorerrorsuccessfully,nothingisprinted.throwMethod.followedbycaught::demo8:Whichofthefollowingstatementsa
9、renotlega1?1=4990;i=4L;d=;t=9:Givethefol
此文档下载收益归作者所有