欢迎来到天天文库
浏览记录
ID:18133714
大小:68.50 KB
页数:65页
时间:2018-09-14
《scjp认证考试历年真题1.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、SCJP认证考试历年真题我在网上见到很多关于SCJP考试的说法,很多人说他简单!确实是这样的!但是这种说法只是当你拿到拿仅有的一套题的时候,你可以这样说!有人说他考的相当全面,确实是这样的,当你看到这一两百套题给你的时候,你就会有此感悟!呵呵!头晕啊!它考的好多地方都是你在看资料的时候不留心的地方你得不时的翻箱倒柜的找资料!这第2套题有147道题,你可以将它收集起来!当你留心看的时候,你的心就宛如一团乱麻,天那,这考的什么?想学真本事,就静下心,仔细研究吧!!!这是19-50题!310-025LeadingthewayinIT
2、testingandcertificationtools,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.Anexceptionisthrown.F.Thec
3、odewillnotcompile.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.Bazhasthevalueof“”B.Bazhasthevalueofnu
4、llC.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+index;Whatistheresult?A.Bazhasthevalueof0B.
5、Bazhasthevalueof1C.Bazhasthevalueof2D.Anexceptionisthrown.E.Thecodewillnotcompile.Answer:BQuestionNo22Given:1.publicclassfoo{2.publicstaticvoidmain(String[]args){3.Strings;4.system.out.printIn(“s=”+s);5.}6.}Whatistheresult?A.Thecodecompilesand“s=”isprinted.B.Thecode
6、compilesand“s=null”isprinted.C.Thecodedoesnotcompilebecausestringsisnotinitialized.D.Thecodedoesnotcompilebecausestringscannotbereferenced.E.Thecodecompiles,butaNullPointerExceptionisthrownwhentoStringiscalled.Answer:CQuestionNo23Whichwilldeclareamethodthatforcesasu
7、bclasstoimplementit?A.Publicdoublemethoda();B.Staticvoidmethoda(doubled1){}C.Publicnativedoublemethoda();D.Abstractpublicvoidmethoda();E.Protectedvoidmethoda(doubled1){}Answer:DQuestionNo24Youwantsubclassesinanypackagetohaveaccesstomembersofasuperclass.Whichisthemos
8、trestrictiveaccessmodifierthatwillaccomplishthisobjective?A.PublicB.PrivateC.ProtectedD.TransientE.NoaccessmodifierisqualifiedAnswer:CQues
此文档下载收益归作者所有