欢迎来到天天文库
浏览记录
ID:38686025
大小:41.00 KB
页数:7页
时间:2019-06-17
《程序员英文考题》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、SCJP考试题310-025原题及解答1.Whichstatementarecharacteristicsofthe>>and>>>operators.A.>>performsashiftB.>>performsarotateC.>>performsasignedand>>>performsanunsignedshiftD.>>performsanunsignedand>>>performsasignedshiftE.>>shouldbeusedonintegralsand>>>shouldbeusedonfloatingpointtypesC.2.Give
2、nthefollowingdeclarationStrings="Example";Whicharelegalcode?A.s>>>=3;B.s[3]="x";C.inti=s.length();D.Stringt="For"+s;E.s=s+10;CDE.3.GiventhefollowingdeclarationStrings="hello";Whicharelegalcode?A.s>>=2;B.charc=s[3];C.s+="there";D.inti=s.length();E.s=s+3;CDE.4.Whichstatementsaretruea
3、boutlisteners?A.Thereturnvaluefromalistenerisofbooleantype.B.Mostcomponentsallowmultiplelistenerstobeadded.C.Acopyoftheoriginaleventispassedintoalistenermethod.D.Ifmultiplelistenersareaddedtoasinglecomponent,theyallmustallbefriendstoeachother.E.Ifthemultiplelistenersareaddedtoasing
4、lecomponent,theorder[inwhichlistenersarecalledisguaranteed].BC.5.Whatmightcausethecurrentthreadtostopexecuting.A.AnInterruptedExceptionisthrown.B.Thethreadexecutesawait()call.C.ThethreadconstructsanewThread.D.Athreadofhigherprioritybecomesready.E.ThethreadexecutesawaitforID()callon
5、aMediaTracker.ABDE.6.Giventhefollowingincompletemethod.1.publicvoidmethod(){2.3.if(someTestFails()){4.5.}6.7.}YouwanttomakethismethodthrowanIOExceptionif,andonlyif,themethodsomeTestFails()returnsavalueoftrue.Whichchangesachievethis?A.Addatline2:IOExceptione;B.Addatline4:throwe;C.Ad
6、datline4:thrownewIOException();D.Addatline6:thrownewIOException();E.Modifythemethoddeclarationtoindicatethatanobjectof[type]Exceptionmightbethrown.CE.7.Whichmodifiershouldbeappliedtoamethodforthelockoftheobjectthistobeobtainedpriortoexecutinganyofthemethodbody?A.finalB.staticC.abst
7、ractD.protectedE.synchronizedE.8.WhicharekeywordsinJava?A.NULLB.trueC.sizeofD.implementsE.instanceofDE.9.Considerthefollowingcode:Integers=newInteger(9);Integert=newInteger(9);Longu=newLong(9);Whichtestwouldreturntrue?A.(s==u)B.(s==t)C.(s.equals(t))D.(s.equals(9))E.(s.equals(newInt
8、eger(9))CE.10.Whywouldares
此文档下载收益归作者所有