网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
IntheeventofaGSSfailureinaGSScluster,whichistrue?()
A.ThecurrentconnectionsarereroutedviathebackupGSS
B.SecondaryGSScannotbeusedtoconfiguretheGSScluster
C.AllremainingGSSsintheclustercontinuerespondingtoanynewqueries
D.AllrecordsintheGSSdatabaseareflushedandreconstructedagainusinganewmasterGSS
参考答案
更多 “ IntheeventofaGSSfailureinaGSScluster,whichistrue?() A.ThecurrentconnectionsarereroutedviathebackupGSSB.SecondaryGSScannotbeusedtoconfiguretheGSSclusterC.AllremainingGSSsintheclustercontinuerespondingtoanynewqueriesD.AllrecordsintheGSSdatabaseareflushedandreconstructedagainusinganewmasterGSS ” 相关考题
考题
GiventhatsessionisavalidHttpSessionobject:Intmax=session.getAttribute(MyReallyLongName”);Whichistrue?()
A.Thevaluereturnedneedstobecasttoanint.B.ThegetAttributemethostakestwoarguments.C.PrimitiveCANNOTbestoredintheHttpSession.D.TheHttpSessionattributenamemustNOTexceedeightcharacters.
考题
GiventheTag:AssumingthetagreferencedbymyTags:getAdviceusestheClassiceventmodel,whichistrue?()
A.ThedoAfterBodymethodiscalled.B.ThedoEndTagmethodisNOTcalled.C.ThetypeattributemaybespecifiedintheTLDD.ThedoStartTagMethodmustalwaysreturnSKIP_BODY.E.TheTLDforthistagmustNOTincludeatag.
考题
publicclassPerson{2.privateStringname;3.publicPerson(Stringname){this.name=name;}4.publicbooleanequals(Personp){5.returnp.name.equals(this.name);6.}7.}Whichistrue?()
A.TheequalsmethoddoesNOTproperlyoverridetheObject.equalsmethod.B.Compilationfailsbecausetheprivateattributep.namecannotbeaccessedinline5.C.Toworkcorrectlywithhash-baseddatastructures,thisclassmustalsoimplementthehashCodemethod.D.WhenaddingPersonobjectstoajava.util.Setcollection,theequalsmethodinline4willpreventduplicates.
考题
publicclassPerson{privatename;publicPerson(Stringname){this.name=name;}publicbooleanequals(Objecto){if(!oinstanceofPerson)returnfalse;Personp=(Person)o;returnp.name.equals(this.name);}}Whichistrue?()
A.CompilationfailsbecausethehashCodemethodisnotoverridden.B.AHashSetcouldcontainmultiplePersonobjectswiththesamename.C.AllPersonobjectswillhavethesamehashcodebecausethehashCodemethodisnotoverridden.D.IfaHashSetcontainsmorethanonePersonobjectwithname=”Fred”,thenremovinganother person,alsowithname=”Fred”,willremovethemall.
考题
classClassA{publicintnumberOfinstances;protectedClassA(intnumberOfinstances){this.numberOflnstances=numberOfinstances;}}publicclassExtendedAextendsClassA{privateExtendedA(intnumberOfinstances){super(numberOflnstances);}publicstaticvoidmain(String[]args){ExtendedAext=newExtendedA(420);System.out.print(ext.numberOflnstances);}}Whichistrue?()A.420istheoutput.B.Anexceptionisthrownatruntime.C.Allconstructorsmustbedeclaredpublic.D.ConstructorsCANNOTusetheprivatemodifier.E.ConstructorsCANNOTusetheprotectedmodifier.
考题
classSuperClass{2.publicageta(){3.returnnewa();4.}5.}6.classSubClassextendsSuperClass{7.publicbgeta(){8.returnnewb();9.}10.}Whichistrue?()
A.Compilationwillsucceedifaextendsb.B.Compilationwillsucceedifbextendsa.C.Compilationwillalwaysfailbecauseofanerrorinline7.D.Compilationwillalwaysfailbecauseofanerrorinline8.
考题
voidwaitForSignal(){Objectobj=newObject();synchronized(Thread.currentThread()){obj.wait();obj.notify();}}Whichistrue?()
A.ThiscodemaythrowanInterruptedException.B.ThiscodemaythrowanIllegalStateException.C.ThiscodemaythrowaTimeoutExceptionaftertenminutes.D.Thiscodewillnotcompileunless“obj.wait()”isreplacedwith“((Thread)obj).wait()”.E.Reversingtheorderofobj.wait()andobj.notify()maycausethismethodtocompletenormally.F.Acalltonotify()ornotifyAll()fromanotherthreadmaycausethismethodtocompletenormally.
考题
publicclassTestSevenextendsThread{privatestaticintx;publicsynchronizedvoiddoThings(){intcurrent=x;current++;x=current;}publicvoidrun(){doThings();}}Whichistrue?()
A.Compilationfails.B.Anexceptionisthrownatruntime.C.Synchronizingtherun()methodwouldmaketheclassthread-safe.D.Thedatainvariable“x”areprotectedfromconcurrentaccessproblems.E.DeclaringthedoThings()methodasstaticwouldmaketheclassthread-safe.F.WrappingthestatementswithindoThings()inasynchronized(newObject()){}blockwouldmaketheclassthread-safe.
考题
Giventhismethodinaclass:publicStringtoString(){StringBufferbuffer=newStringBuffer();buffer.append(??);buffer.append(this.name);buffer.append(??);returnbuffer.toString();}Whichistrue?()
A.ThiscodeisNOTthread-safe.B.TheprogrammercanreplaceStringBufferwithStringBuilderwithnootherchanges.C.ThiscodewillperformwellandconvertingthecodetouseStringBuilderwillnotenhancetheperformance.D.Thiscodewillperformpoorly.Forbetterperformance,thecodeshouldberewritten:return““+this.name+“”;
考题
23.intz=5;24.25.publicvoidstuff1(intx){26.assert(x0);27.switch(x){28.case2:x=3;29.default:assertfalse;}}30.31.privatevoidstuff2(inty){assert(y0);}32.33.privatevoidstuff3(){assert(stuff4O);}34.35.privatebooleanstuff4(){z=6;returnfalse;}Whichistrue?()A.Alloftheassertstatementsareusedappropriately.B.Onlytheassertstatementonline31isusedappropriately.C.Theassertstatementsonlines29and31areusedappropriately.D.Theassertstatementsonlines26and29areusedappropriately.E.Theassertstatementsonlines29and33areusedappropriately.F.Theassertstatementsonlines29,31,and33areusedappropriately.G.Theassertstatementsonlines26,29,and31areusedappropriately.
考题
publicclassPerson{privatename;publicPerson(Stringname){this.name=name;}publicinthashCode(){return420;}}Whichistrue?()
A.ThetimetofindthevaluefromHashMapwithaPersonkeydependsonthesizeofthemap.B.DeletingaPersonkeyfromaHashMapwilldeleteallmapentriesforallkeysoftypePerson.C.InsertingasecondPersonobjectintoaHashSetwillcausethefirstPersonobjecttoberemovedasaduplicate.D.ThetimetodeterminewhetheraPersonobjectiscontainedinaHashSetisconstantanddoesNOTdependonthesizeofthemap.
考题
publicclassCreditCard{privateStringcardlD;privateIntegerlimit;publicStringownerName;publicvoidsetCardlnformation(StringcardlD,StringownerName,28.Integerlimit){this.cardlD=cardlD;this.ownerName=ownerName;this.limit=limit;}}Whichistrue?()A.Theclassisfullyencapsulated.B.Thecodedemonstratespolymorphism.C.TheownerNamevariablebreaksencapsulation.D.ThecardlDandlimitvariablesbreakpolymorphism.E.ThesetCardlnformationmethodbreaksencapsulation.
考题
Refertotheexhibit.AccordingtotheequipmenttabinCiscoUCSManager,whichistrue?()
A.Aisanuplinkport,Bisafabricport,Cisaserverport,Disabackplaneport,EisaDCEinterface,andFisavNICB.Aisanuplinkport,Bisaserverport,Cisafabricport,Disabackplaneport,EisaDCEinterface,andFisavNICC.Aisanuplinkport,Bisafabricport,Cisabackplaneport,Disaserverport,EisaDCEinterface,andFisavNICD.Aisanuplinkport,Bisaserverport,Cisafabricport,DisaDCEinterface,Eisabackplaneport,andFisavNICE.Aisanfabricport,Bisadownlinkport,Cisanuplinkport,Disaserverport,EisaVICinterface,andFisavNIC
考题
单选题55.int[]x={1,2,3,4,5}; 56.inty[]=x; 57.System.out.println(y[2]); Whichistrue?()A
Line 57 will print the value 2.B
Line 57 will print the value 3.C
Compilation will fail because of an error in line 55.D
Compilation will fail because of an error in line 56.
热门标签
最新试卷