欢迎来到天天文库
浏览记录
ID:17873763
大小:68.50 KB
页数:65页
时间:2018-09-07
《scjp认证考试历年真题1》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、SCJP认证考试历年真题我在网上见到很多关于SCJP考试的说法,很多人说他简单!确实是这样的!但是这种说法只是当你拿到拿仅有的一套题的时候,你可以这样说!有人说他考的相当全面,确实是这样的,当你看到这一两百套题给你的时候,你就会有此感悟!呵呵!头晕啊!它考的好多地方都是你在看资料的时候不留心的地方你得不时的翻箱倒柜的找资料!这第2套题有147道题,你可以将它收集起来!当你留心看的时候,你的心就宛如一团乱麻,天那,这考的什么?想学真本事,就静下心,仔细研究吧!!!这是19-50题!310-025Leading
2、thewayinITtestingandcertificationtools,www.testking.comQuestionNo19Given:8.intindex=1;9.boolean[]test=newBoolean[3];10.booleanfoo=test[index];Whatistheresult?A.Foohasthevalueof0.B.Foohasthevalueofnull.C.Foohasthevalueoftrue.D.Foohasthevalueoffalse.E.Anexce
3、ptionisthrown.F.Thecodewillnotcompile.Answer:DQuestionNo20Given:1.publicclasstest(2.publicstaticvoidmain(string[]args){3.stringfoo=args[1];4.stringfoo=args[2];5.stringfoo=args[3];6.}7.}Andcommandlineinvocation:JavaTestredgreenblueWhatistheresult?A.Bazhasth
4、evalueof“”B.BazhasthevalueofnullC.Bazhasthevalueof“red”D.Bazhasthevalueof“blue”E.Baxhasthevalueof“green”F.Thecodedoesnotcompile.G.Theprogramthrowsanexception.Answer:GQuestionNo21Given:8.intindex=1;9.int[]foo=newint[3];10.intbar=foo[index];11.intbaz=bar+ind
5、ex;Whatistheresult?A.Bazhasthevalueof0B.Bazhasthevalueof1C.Bazhasthevalueof2D.Anexceptionisthrown.E.Thecodewillnotcompile.Answer:BQuestionNo22Given:1.publicclassfoo{2.publicstaticvoidmain(String[]args){3.Strings;4.system.out.printIn(“s=”+s);5.}6.}Whatisthe
6、result?A.Thecodecompilesand“s=”isprinted.B.Thecodecompilesand“s=null”isprinted.C.Thecodedoesnotcompilebecausestringsisnotinitialized.D.Thecodedoesnotcompilebecausestringscannotbereferenced.E.Thecodecompiles,butaNullPointerExceptionisthrownwhentoStringiscal
7、led.Answer:CQuestionNo23Whichwilldeclareamethodthatforcesasubclasstoimplementit?A.Publicdoublemethoda();B.Staticvoidmethoda(doubled1){}C.Publicnativedoublemethoda();D.Abstractpublicvoidmethoda();E.Protectedvoidmethoda(doubled1){}Answer:DQuestionNo24Youwant
8、subclassesinanypackagetohaveaccesstomembersofasuperclass.Whichisthemostrestrictiveaccessmodifierthatwillaccomplishthisobjective?A.PublicB.PrivateC.ProtectedD.TransientE.NoaccessmodifierisqualifiedAnswer:CQues
此文档下载收益归作者所有