单项选择题

A.Ifthethreecomponentsareaddeddirectlytothepanel.WhichlayoutmanagercanthepanelusetoensurethattheTextAreaabsorbsallofthefreeverticalspacewhenthepanelisresized?()
A.GridLayout.
B.CardLayout.
C.FlowLayout.
D.BorderLayout.
E.GridBagLayout.
相关考题

单项选择题 publicclassIfTest(publicstaticvoidmain(stringargs){intx=3;inty=1;if(x=y)system.out.printIn(Notequal”);elsesystem.out.printIn(Equal”);})Whatistheresult?()

单项选择题 Youneedtostoreelementsinacollectionthatguaranteesthatnoduplicatesarestoredandallelementscanbeaccessedinnaturalorder.Whichinterfaceprovidesthatcapability?()

单项选择题 Thefilefile.txt”existsonthefilesystemandcontsinsASCIItext.Given:try{Filef=newFile(file.txt”);OutputStreamout=newFileOutputStream(f,true);}catch(IOException){}Whatistheresult?()

判断题 目前华为5G在Sub6G上能达到的最高频谱利用率为98.28%。()

单项选择题 WhichcanbeusedtoencodecharSforoutput?()

单项选择题 Whichgetsthenameoftheparentdirectoryfile“file.txt”?()

多项选择题 5G支持全频谱接入,()频段均可用于5G。

单项选择题 interfaceBeta{}classAlphaimplementsBeta{StringtestIt(){returnTested”;}}publicclassMain1{staticBetagetIt(){returnnewAlpha();}publicstaticvoidmain(String[]args){Betab=getIt();System.out.println(b.testIt());}}Whatistheresult?()A.TestedB.Compilationfails.C.Thecoderunswithnooutput.D.Anexceptionisthrownatruntime.

单项选择题 publicclassOuter{2.publicvoidsomeOuterMethod(){3.//Line34.}5.publicclassInner{}6.publicstaticvoidmain(String[]argv){7.Outero=newOuter();8.//Line89. }10. }WhichinstantiatesaninstanceofInner?()

单项选择题 20.publicfloatgetSalary(Employeee){21.assertvalidEmployee(e);22.floatsal=lookupSalary(e);23.assert(sal>0);24.returnsal;25.}26.privateintgetAge(Employeee){27.assertvalidEmployee(e);28.intage=lookupAge(e);29.assert(age>0);30.returnage;31.}Whichlineisaviolationofappropriateuseoftheassertionmechanism?()A.line21B.line23C.line27D.line29

单项选择题 Whichfragmentisanexampleofinappropriateuseofassertions?()

单项选择题 inti=1,j=10;do{if(i>j){continue;}j--;}while(++i<6);System.out.println(i=+i+”andj=+j);Whatistheresult?()

单项选择题 publicclassA{2.voidA(){3.System.out.println(ClassA”);4.}5.publicstaticvoidmain(String[]args){6.newA();7.}8.}Whatistheresult?()

单项选择题 inti=0;while(true){if(i==4){break;}++i;}System.out.println(i=”+i);Whatistheresult?()

单项选择题 1.publicclassExceptionTest{2.classTestExceptionextendsException{}3.publicvoidrunTest()throwsTestException{}4.publicvoidtest()/*PointX*/{5.runTest();6.}7.}AtPointXonline4,whichcodeisnecessarytomakethecodecompile?()A.Nocodeisnecessary.B.throwsExceptionC.catch(Exceptione)D.throwsRuntimeExceptionE.catch(TestExceptione)

单项选择题 floatf[][][]=newfloat[3][][];floatf0=1.0f;float[][]farray=newfloat[1][1];Whatisvalid?()

单项选择题 Whatallowstheprogrammertodestroyanobjectx?()

单项选择题 publicvoidfoo(booleana,booleanb){if(a){System.out.println(A”);}elseif(a&&b){System.out.println(A&&B”);}else{17.if(!b){System.out.println(notB”);}else{System.out.println(ELSE”);}}}Whatiscorrect?()A.Ifaistrueandbistruethentheoutputis“A&&B”.B.Ifaistrueandbisfalsethentheoutputis“notB”.C.Ifaisfalseandbistruethentheoutputis“ELSE”.D.Ifaisfalseandbisfalsethentheoutputis“ELSE”.

单项选择题 Howcanyoucreatealistenerclassthatreceiveseventswhenthemouseismoved?()

单项选择题 Whichtypeofeventindicatesakeypressedonajava.awt.Component?()