欢迎来到天天文库
浏览记录
ID:6384474
大小:167.50 KB
页数:24页
时间:2018-01-12
《北京神州数码思特奇信息技术股份有限公司java工程师笔试题》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、1:Whatiswrittentothestandardoutputgiventhefollowingstatement:System.out.println(4
2、7); Selecttherightanswer: A.4 B.5 C.6 D.7 2:Whatwillhappenwhenyouattempttocompileandrunthefollowingcode?publicclassStatic{static{intx=5;}staticintx,y;publicstaticvoidmain(
3、Stringargs[]){x--;myMethod();System.out.println(x+y+++x);}publicstaticvoidmyMethod(){y=x+++++x;}}Choices:A.prints:2 B.prints:3 C.prints:7 D.prints:8 3:WhichstatementsaboutJavacodesecurityarenottrue? A.Thebytecodeverifierloadsallclassesneededfortheexecut
4、ionofaprogram. B.Executingcodeisperformedbytheruntimeinterpreter. C.Atruntimethebytecodesareloaded,checkedandruninaninterpreter. D.Theclassloaderaddssecuritybyseparatingthenamespacesfortheclassesofthelocalfilesystemfromthoseimportedfromnetworksources. 4
5、:SelectvalididentifierofJava:A.%passwd B.3d_game C.$charge D.this 5:ThefollowingcodeisentirecontentsofafilecalledExample.java,causespreciselyoneerrorduringcompilation:classSubClassextendsBaseClass{}classBaseClass(){Stringstr;publicBaseClass(){System.out
6、.println(“ok”);}publicBaseClass(Strings){str=s;}}publicclassExample{publicvoidmethod(){SubClasss=newSubClass(“hello”);BaseClassb=newBaseClass(“world”);}}Whichlinewouldbecausetheerror?A.9 B.10 C.11 D.12 6:Usetheoperator“>>”and“>>>”.Whichstatementistrue?
7、A.10100000000000000000000000000000>>4give00001010000000000000000000000000 B.10100000000000000000000000000000>>4give11111010000000000000000000000000 C.10100000000000000000000000000000>>>4give00000000000000000000000000000000 D.1010000000000000000000000000
8、0000>>>4give11111010000000000000000000000000 7:Whatresultsfromattemptingtocompileandrunthefollowingcode?publicclassTernary{publicstaticvoidmain(Stringargs[]){inta=5;System.out.println("Valueis-"+((a<5)?9.9:9));}}Choices:A.prints:Valueis-9 B.Compilatione
9、rror C.prints:Valueis-5 D.Noneofthese 8:使用JDBC可以做到的是 A.把二进制代码传送到任何关系数据库中 B.把Java源代码传送到任何关系数据库中 C.把表单信息传送到任何关系数据库中 D.很容易地把SQL语句传送到任何关系数据库中 9:publicclassOuterClass{privatedoubled1=1.0;//insertcodehere}Youneedtoinsertaninnerclassdec
此文档下载收益归作者所有