java200道選擇題已做_第1頁
java200道選擇題已做_第2頁
java200道選擇題已做_第3頁
java200道選擇題已做_第4頁
java200道選擇題已做_第5頁
已閱讀5頁,還剩34頁未讀 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、.選擇題2341 .下面中哪兩個可以在A的子類中使用:A,CclassAprotectedintmethod1(inta,intb)return0;A. publicintmethod1(inta,intb)return0;B. privateintmethod1(inta,intb)return0;C. privateintmethod1(inta,longb)return0;D. publicshortmethod1(inta,intb)return0;2 .Abstractmethodcannotbestatic.TrueorFalse?(A)A.TrueB.False3 .Whatwi

2、llbetheoutputwhenyoucompileandexecutethefollowingprogram.classBasevoidtest()System.out.println("Base.test()");publicclassChildextendsBasevoidtest()System.out.println("Child.test()");staticpublicvoidmain(Stringa)ChildanObj=newChild();BasebaseObj=(Base)anObj;baseObj.test();Selectmo

3、stappropriateanswer.AA.Child.test()Base.test()B.Base.test()Child.test()C.Base.test()D.Child.test()4 .Whatwillbetheoutputwhenyoucompileandexecutethefollowingprogram.classBasestaticvoidtest()System.out.println("Base.test()");publicclassChildextendsBasevoidtest()System.out.println("Child

4、.test()");Base.test();/Calltheparentmethodstaticpublicvoidmain(Stringa)newChild().test();Selectmostappropriateanswer.CA.Child.test()Base.test()B.Child.test()Child.test()C. Compilationerror.CannotoverrideastaticmethodbyaninstancemethodD. Runtimeerror.Cannotoverrideastaticmethodbyaninstancemethod

5、5.Whatwillbetheoutputwhenyoucompileandexecutethefollowingprogram.publicclassBaseprivatevoidtest()System.out.println(6+6+"(Result)");staticpublicvoidmain(Stringa)newBase().test();Selectmostappropriateanswer.BA.66(Result)B.12(Result)C. RuntimeError.Incompatibletypefor+.Can'tconvertanintt

6、oastring.D. CompilationError.Incompatibletypefor+.Can'taddastringtoanint.6.1. hatwillbetheoutputwhenyoucompileandexecutethefollowingprogram.Thesymbol.meansspace.publicclassBaseprivatevoidtest()StringaStr=".One."StringbStr=aStr;aStr.toUpperCase();aStr.trim();System.out.println("&qu

7、ot;+aStr+","+bStr+"");staticpublicvoidmain(Stringa)newBase().test();Selectmostappropriateanswer.EA.ONE,.One.B.One.,OneC.ONE,OneD.ONE,ONEE.One.,.One.7.下面關于變量及其圍的述哪些是不正確的B:A實例變量是類的成員變量)B.實例變量用關鍵字static聲明(用static修飾的變量稱之為類變量或者靜態(tài)變量)C.在方法中定義的局部變量在該方法被執(zhí)行時創(chuàng)立(方法加載的時候創(chuàng)立局部變量)D局部變量在使用前必須被初始化

8、(必須被賦值)8.以下關于修飾符混用的說法,錯誤的選項是D:A.abstract不能與final并列修飾同一個類8 abstract類中可以有private的成員C. abstract方法必須在abstract類中D. static方法中能處理非static的屬性(靜態(tài)方法中不能引用非靜態(tài)的成員)9 .執(zhí)行完以下代碼intx=newint25;后,以下哪項說明是正確的A:X屬于引用類型該引用類型的每一個成員是int類型,默認值為0;A、x24為0B、x24未定義C、x25為0D、x0為空10 .編譯運行以下程序后,關于輸出結果的說明正確的選項是C:publicclassConditionalp

9、ublicstaticvoidmain(Stringargs)intx=4;System.out.println(“valueis“+(x>4)?99.9:9);A、輸出結果為:valueis99.99B、輸出結果為:valueis9C、輸出結果為:valueis9.0D、編譯錯誤11.關于以下application的說明,正確的選項是C:自由塊是類加載的時候就會被自動執(zhí)行到的,自由塊的執(zhí)行順序是按照在類中出現(xiàn)的先后順序執(zhí)行;classStaticStuff3 staticintx=10;4 staticx+=5;5 publicstaticvoidmainStringargs7 Sys

10、tem.out.println(“+xx)=;8 9 staticx/=3;10 .A、4行與9行不能通過編譯,因為缺少方法名和返回類型B、 9行不能通過編譯,因為只能有一個靜態(tài)初始化器C、 編譯通過,執(zhí)行結果為:x=5D、編譯通過,執(zhí)行結果為:x=312.關于以下程序代碼的說明正確的選項是D:1 classHasStatic2 privatestaticintx=100;3 publicstaticvoidmain(Stringargs)4 HasStatichs1=newHasStatic();5 hs1.x+;6 HasStatichs2=newHasStatic();7 hs2.x+;

11、8 hs1=newHasStatic();9 hs1.x+;10 HasStatic.x-;11 System.out.println(+“x);x=12 13 A、5行不能通過編譯,因為引用了私有靜態(tài)變量B、10行不能通過編譯,因為x是私有靜態(tài)變量C、程序通過編譯,輸出結果為:x=103D、程序通過編譯,輸出結果為:x=10213.以下說確的有C構造方法的作用是在實例化對象的時候給數(shù)據成員進展初始化;A. class中的constructor不可省略B. constructor必須與class同名,但方法不能與class同名(構造方法與類同名,類中可以有和類名一樣的方法)Cconstruct

12、or在一個對象被new時執(zhí)行D.一個class只能定義一個constructor(構造方法可以重載)14 .以下哪種說法是正確的DA實例方法可直接調用超類的實例方法(實例方法不可以直接調用超類的私有實例方法)B.實例方法可直接調用超類的類方法(實例方法不可以直接調用超類的私有的類方法)C.實例方法可直接調用其他類的實例方法(要看訪問權限)D實例方法可直接調用本類的類方法15 .以下哪一種表達是正確的DAabstract修飾符可修飾字段、方法和類(abstract可以修飾方法和類但是不能修飾屬性)B抽象方法的body局部必須用一對大括號包住(抽象方法沒有方法體所以沒有大括號)C聲明抽象方法,大括

13、號可有可無D聲明抽象方法不可寫出大括號16 .下面代碼的執(zhí)行結果是?(B)importjava.util.*;publicclassShortSetpublicstaticvoidmain(Stringargs)Set<Short>s=newHashSet<Short>();for(Shorti=0;i<100;i+)s.add(i);s.remove(i-1);System.out.println(s.size();A.1B.100C.ThrowsExceptionD.NoneoftheAbove17 .鏈表具有的特點是:(ACD)A、不必事先估計存儲空間B、可

14、隨機訪問任一元素(不能隨機訪問,查找時要從頭指針開場遍歷)C、插入刪除不需要移動元素D、所需空間與線性表長度成正比18 .Java語言中,String類的indexOf()方法返回的類型是?(C)A、Int16B、Int32C、intD、long19 .以下關于面向對象概念的描述中,不正確的一項為哪一項B。A.在現(xiàn)實生活中,對象是指客觀世界的實體B.程序中的對象就是現(xiàn)實生活中的對象C.在程序中,對象是通過一種抽象數(shù)據類型來描述的,這種抽象數(shù)據類型稱為類classD.在程序中,對象是一組變量和相關方法的集合20 .執(zhí)行以下代碼后,哪個結論是正確的String口s=newString10;(AD)

15、s為弓I用類型,s中的每個成員都是引用類型,即String類型,String類型默認值為null;s數(shù)組的長度為10As9為null;Bs10為""Cs0為未定義Ds.length為1021 .屬性的可見性有。(ABD)A.公有的(public)B.私有的(private)C.私有保護的D.保護的(protected)22.在字符串前面加上_B_符號,那么字符串中的轉義字符將不被處理。(選擇1項)A.B.C.#D.%23.以下代碼哪行會出錯:(C)k沒有初始化就使用了1) publicvoidmodify()2) intI,j,k;3) I=100;4) while(I&g

16、t;0)5) j=I*2;6) System.out.println("Thevalueofjis"+j);7) k=k+1;8) I-;9) 10) A.4B.6C.7D.824 .對記錄序列314,298,508,123,486,145按從小到大的順序進展插入排序,經過兩趟排序后的結果為:(B)A.314,298,508,123,145,486B.298,314,508,123,486,145C.298,123,314,508,486,145D.123、298,314,508,486,14525 .棧是一種。(A)A.存取受限的線性構造B.存取不受限的線性構造C.存取受

17、限的非線性構造D.存取不受限的非線性構造26 .以下哪些語句關于存回收的說明是正確的。(B)A.程序員必須創(chuàng)立一個線程來釋放存B.存回收程序負責釋放無用存C.存回收程序允許程序員直接釋放存D.存回收程序可以在指定的時間釋放存對象27 .Whichmethodmustbedefinedbyaclassimplementingthejava.lang.Runnableinterface?(眼現(xiàn)Runnable接口,接口中有一個抽象方法run實現(xiàn)類中的該方法A.voidrun()B.publicvoidrun()C.publicvoidstart()D.voidrun(intpriority)E.p

18、ublicvoidrun(intpriority)F.publicvoidstart(intpriority)28 Given:(A)匿名部類覆蓋hashCode方法)publicstaticvoidmain(Stringargs)Objectobj=newObject()publicinthashCode()return42;System.out.println(obj.hashCode();Whatistheresult?A. 42B. Anexceptionisthrownatruntime.C. Compilationfailsbecauseofanerroronline12.D. C

19、ompilationfailsbecauseofanerroronline16.E. Compilationfailsbecauseofanerroronline17.29WhichtwoarereservedwordsintheJavaprogramminglanguage?(BD)import導入包的保存字,implement實現(xiàn)接口的保存字A.runB.importC.defaultD.implements30. WhichtwostatementsaretrueregardingthereturnvaluesofpropertywrittenhashCodeandequalsmetho

20、dsfromtwoinstancesofthesameclass?(CD)A. IfthehashCodevaluesaredifferent,theobjectsmightbeequal.B. IfthehashCodevaluesarethesame,theobjectmustbeequal.C. IfthehashCodevaluesarethesame,theobjectsmightbeequal.D. IfthehashCodevaluesaredifferent,theobjectsmustbeunequal.31. Whatisthenumericalrangeofachar?(

21、B)A.032767B.065535C.-256255D.-3276832767E.Rangeisplatformdependent.32. Given:publicclassTestprivatestaticfloatf=newfloat2;publicstaticvoidmain(Stringargs)System.out.println(“f0=“+f0);Whatistheresult?(B)A.f0=0B.f0=0.0C.Compilationfails.D.Anexceptionisthrownatruntime.33. Given:publicclassTestpublicsta

22、ticvoidmain(Stringargs)Stringstr=NULL;(NULL不應該是大寫)System.out.println(str);Whatistheresult?(B)A.NULLB.Compilationfails(編譯失敗).C.Thecoderunswithnooutput.D.Anexceptionisthrownatruntime.34. Exhibit:1. publicclassXimplementsRunnable2. privateintx;3. privateinty;4. publicstaticvoidmain(Stringargs)5. Xthat=

23、newX();6. (newThread(that).start();7. (newThread(that).start();8. 9. publicsynchronizedvoidrun()10. for(;)11. x+;12. y+;13. System.out.println(“x=“+x+“,y=“+y);14. 15. 16. Whatistheresult?(E)A. Anerroratline11causescompilationtofail.B. Errorsatlines7and8causecompilationtofail.C. Theprogramprintspairs

24、ofvaluesforxandythatmightnotalwaysbethesameonthesameline(forexample,“x)=2,y=1D. Theprogramprintspairsofvaluesforxandythatarealwaysthesameonthesameline(forexample,“x=1,y=1.Inaddition,eachvalueappearstwice(forexample,“x=1y=1followedby“x=1,y=)1E. Theprogramprintspairsofvaluesforxandythatarealwaysthesam

25、eonthesameline(forexample,“x=1,y=1.Inaddition,eachvalueappearstwice(forexample,“x=1y=1followedby“x=2,y=)235、 WhichtwoCANNOTdirectlycauseathreadtostopexecuting?(CD)A. Existingfromasynchronizedblock.B. Callingthewaitmethodonanobject.C. Callingnotifymethodonanobject.D. CallingreadmethodonanInputStreamo

26、bject.E. CallingtheSetPrioritymethodonaThreadobject.36、 Whichtwostatementsaretrueregardingthecreationofadefaultconstructor?(CE)A. Thedefaultconstructorinitializesmethodvariables.B. Thedefaultconstructorinvokestheno-parameterconstructorofthesuperclass.C. Thedefaultconstructorinitializestheinstancevar

27、iablesdeclaredintheclass.D. Ifaclasslacksano-parameterconstructor,buthasotherconstructors,thecompilercreatesadefaultconstructor.E. Thecompilercreatesadefaultconstructoronlywhentherearenootherconstructorsfortheclass.37、 Given:publicclassOuterClassprivatedoubled1=1.0;/insertcodehereYouneedtoinsertanin

28、nerclassdeclarationatline2.Whichtwoinnerclassdeclarationsarevalid?(CE)A. staticclassInnerOnepublicdoublemethoda()returnd1;B. staticclassInnerOnestaticdoublemethoda()returnd1;C. privateclassInnerOnepublicdoublemethoda()returnd1;D. protectedclassInnerOnestaticdoublemethoda()returnd1;E. publicabstractc

29、lassInnerOnepublicabstractdoublemethoda();38、 Whichtwodeclarationspreventtheoverridingofamethod?(AD)final修飾方法在子類中不能被重寫A. finalvoidmethoda()B. voidfinalmethoda()C. staticvoidmethoda()D. staticfinalvoidmethoda()E. finalabstractvoidmethoda()39、 Given:publicclassTestpublicstaticvoidmain(Stringargs)class

30、Foopublicinti=3;Objecto=(Object)newFoo();Foofoo=(Foo)o;System.out.println(foo.i);Whatistheresult?(B)(l部部類的使用)A. Compilationwillfail.3B. B.CompilationwillsucceedandtheprogramwillprintC. CompilationwillsucceedbuttheprogramwillthrowaClassCastExceptionatline6.D. Compilationwillsucceedbuttheprogramwillth

31、rowaClassCastExceptionatline7.40、 Given:publicclassTestpublicstaticvoidmain(Stringargs)Stringfoo=“b;lueStringbar=foo;foo=“green;System.out.println(bar);Whatistheresult?(D_)nullA.Anexceptionisthrown.B.Thecodewillnotcompile.C.Theprogramprints« green D.TheprogramprintsbEl.uTeheprogramprints41、 Whi

32、chcodedeterminestheintvaluefooclosesttoadoublevaluebar?(CDEF)A.intfoo=(int)Math.max(bar);B.intfoo=(int)Math.min(bar);C.intfoo=(int)Math.abs(bar);D.intfoo=(int)Math.ceil(bar);E.intfoo=(int)Math.floor(bar);F.intfoo=(int)Math.round(bar);42、 Exhibit:1.packagefoo;2.importjava.util.Vector;3.privateclassMy

33、VectorextendsVector類MyVector不能是私有的)4.inti=1;5.publicMyVector()1.1 =2;7 .8 .9 .publicclassMyNewVectorextendsMyVector10 .publicMyNewVector()11 .i=4;12 .13 .publicstaticvoidmain(Stringargs)14 .MyVectorv=newMyNewVector();15 .16 .ThefileMyNewVector.javaisshownintheexhibit.Whatistheresult?(B)A.Compilation

34、willsucceed.B.Compilationwillfailatline3.C.Compilationwillfailatline6.D.Compilationwillfailatline9.E.Compilationwillfailatline14.43、Given:publicclassTestpublicstaticvoidmain(Stringargs)Stringfoo=args1;Stringbar=args2;ba+zb=az);Stringbaz=args3;System.out.println(Andtheoutput:Baz=2Whichcommandlineinvo

35、cationwillproducetheoutput?(C)A.javaTest2222B.javaTest1234C.javaTest4242D.javaTest432144、Given:1.publicinterfaceFk=4;3.Whichthreeareequivalenttoline2?(ABC)A.finalintk=4;B.Publicintk=4;C.staticintk=4;D.Privateintk=4;E.Abstractintk=4;F.Volatileintk=4;G.Transientintk=4;H.protectedintk=4;45、Given

36、:publicclassfoostaticStrings;publicstaticvoidmain(Stringargs)System.out.println(+“s)s;=Whatistheresult?(B)A. ThecodecompilesandB. ThecodecompilesandispSFFted.uinllted.C. ThecodedoesFotcompilebecausestriFgsisFotiFitialized.D. ThecodedoesFotcompilebecausestriFgscaFFotberefereFced.E. Thecodecompiles,bu

37、taNullPoiFterExceptioFisthrowFwheFtoStriFgiscalled.46、WhichtwocreateaFiFstaFceofaFarray?(AD)A.iFtiaFFewiFt15;B.floatfaFFewfloat20;C.charcaFD.ObjectoaFFewfloat20;E.IFtiaF(4,5,6)(1,2,3)SomeStriFg47、GiveF:publicclassExceptioFTestclassTestExceptioFexteFdsExceptioFpublicvoidruFTest()throwsTestExceptioFpu

38、blicvoidtest()/*PoiFtX*/ruFTest();AtpoiFtXoFliFe4,whichcodecaFbeaddedtomakethecodecompile?(A)A.throwsExceptioFB.Catch(ExceptioFe).C.ThrowsRuFtimeExceptioF.D.Catch(TestExceptione).E.Nocodeisnecessary.48、Exhibit:publicclassSwitchTestpublicstaticvoidmain(Stringargs)System.out.println (v+Swi=chIt(4);pub

39、licstaticintswitchIt(intx)intj=1;switch(x)case 1: j+;case 2: j+;case 3: j+;case 4: j+;case 5: j+;default:j+;returnj+x;Whatistheoutputfromline3?(F)A.Value=3B.Value=4C.Value=5D.Value=6E.Value=7F.Value=849、Whichfourtypesofobjectscanbethrownusingthethrowstatement?(ADEF)A.ErrorB.EventC.ObjectD.ExceptionE

40、.ThrowableF.RuntimeException50在下面程序的第6行補充上以下哪個方法,會導致在編譯過程中發(fā)生錯誤?(B)1) classSuper2) publicfloatgetNum()3) return3.0f;4) 5) pubhcclassSubextendsSuper6)7) A,publicfloatgetNum()retun4.0f;B.publicvoidgetNum()C.publicvoidgetNum(doubled)D.publicdoublegetNum(floatd)retun4.0f;51 .下面關于import,class和package的聲明順序

41、哪個正確?(A)A.package,import,classB.class,import,packageC.import,package,classD.package,class,import52 .下面哪個是正確的?(D)A. Stringtemp=newString"a""b""c"B. Stringtemp="a""b""c"C. Stringtemp="a","b","c"D. Stringtemp=&quo

42、t;a","b","c"53 .關于java.lang.String類,以下描述正確的一項為哪一項AA. String類是final類故不可以繼承;B. String類是final類故可以繼承;C. String類不是final類故不可以繼承;D. String類不是final類故可以繼承;54 .關于實例方法和類方法,以下描述正確的選項是:(D)A. 實例方法只能訪問實例變量(也可以訪問類變量)B. 類方法既可以訪問類變量,也可以訪問實例變量(類方法只能訪問類變量)C. 類方法只能通過類名來調用(類方法可以通過對象調用)D. 實例方法只能通過

43、對象來調用55 .接口是Java面向對象的實現(xiàn)機制之一,以下說確的是:(B)A. Java支持多重繼承,一個類可以實現(xiàn)多個接口;B. Java只支持單重繼承,一個類可以實現(xiàn)多個接口;C. Java只支持單重繼承,一個類只可以實現(xiàn)一個接口;D. Java支持多重繼承,但一個類只可以實現(xiàn)一個接口。56 .以下關于interface的說確的是:(D)A. interface中可以有private方法(接口中不能有private方法)B. interface中可以有final方法(接口中默認的方法是publicabstarct的)C. interface中可以有function實現(xiàn)(接口中的方法不可以

44、有實現(xiàn))D. interface可以繼承其他interface57.A類被打包在 packageA , B類被打包在packageB ,且 B 類被聲明為public ,且有一個成C 類也位于 packageA 包,且繼承了 B 類 。那么以A. A 類的實例不能訪問到 B. A 類的實例能夠訪問到 C. C 類的實例可以訪問到 D. C 類的實例不能訪問到員變量x被聲明為,protected控制方式下說話正確的選項是CB類的實例B類一個實例的x成員B類一個實例的x成員B類的實例58.以下程序正確的輸出是Apackagetest;publicclassFatherClasspublicFath

45、erClass()System.out.println("FatherClassCreate");packagetest;importtest.FatherClass;publicclassChildClassextendsFatherClasspublicChildClass()System.out.println("ChildClassCreate");publicstaticvoidmain(Stringargs)FatherClassfc=newFatherClass();ChildClasscc=newChildClass();A.B.Fath

46、erClassCreateFatherClassCreateFatherClassCreateChildClassCreateChildClassCreateFatherClassCreateC.D.ChildClassCreateChildClassCreateChildClassCreateFatherClassCreateFatherClassCreateFatherClassCreate59 .給定如下代碼,下面哪個可以作為該類的構造函數(shù)(B)(構造方法與類同名但是沒有返回類型)publicclassTest.A.publicvoidTest().B.publicTest().C.pu

47、blicstaticTest().D.publicstaticvoidTest().60 .題目:1. publicclasstest(2. publicstaticvoidmain(Stringargs)3. inti=0xFFFFFFF1;4. intj=i;5.6. 7. )程序運行到第5行時,j的值為多少?(D)A.-15B.0C.1D.1461 .關于sleep(和wait(),以下描述錯誤的一項為哪一項DA. sleep是線程類Thread的方法,wait是Object類的方法;B. sleep不釋放對象鎖,wait放棄對象鎖;C. sleep暫停線程、但監(jiān)控狀態(tài)仍然保持,完畢后會

48、自動恢復;D. wait后進入等待鎖定池,只有針對此對象發(fā)出notify方法后獲得對象鎖進入運行狀態(tài)。62 .下面能讓線程停頓執(zhí)行的有多項選擇(ABDEF)A.sleep();暫停執(zhí)行指定時間B.stop();終止所有未完畢的方法包括run方法C.notify();D.synchronized。;對象鎖E.yield();覺得CPU的效勞質量不夠好,提前退出F.wait();線程需要睡一會醒來后繼續(xù)被效勞G.notifyAll();63 .下面哪個是applet傳遞參數(shù)的正確方式?BA. <appletcode=Test.classage=33width=100height=100>

49、;B. <paramname=agevalue=33>C. <appletcode=Test.classname=agevalue=33width=100height=100>D. <appletTest33>64 .提供Java存取數(shù)據庫能力的包是AA.Java.sql是JDBC的編程接口B.java.awt倒像界面的類庫)C.java.langJAVA編程語言進展程序設計的根底類Djava.swing65 .不能用來修飾interface的有ACD修飾接口可以使默認publicAprivateBpublicCprotectedDstatic66 .以下說

50、確的有BA在類方法中可用this來調用本類的類方法(類方法中不能使用this關鍵字)B在類方法中調用本類的類方法時可直接調用C在類方法中只能調用本類中的類方法(可以調用其他類中的類方法)D在類方法中絕對不能調用實例方法(在類方法中可以通過實例化對象調用實例方法)67.從下面四段A,B,C,D代碼中選擇出正確的代碼段CAabstractclassNameprivateStringname;publicabstractbooleanisStupidName(Stringname)(抽象方法不能有方法體)BpublicclassSomethingvoiddoSomething()方法中定義的是局部變

51、量,不能用類成員變量修飾符privateprivateStrings=""intl=s.length();CpublicclassSomethingpublicstaticvoidmain(Stringargs)Othero=newOther();newSomething().addOne(o);publicvoidaddOne(finalOthero)o.i+;classOtherpublicinti;DpublicclassSomethingpublicintaddOne(finalintx)final修飾常量,常量的值不能被改變)return+x;68 .選擇下面代碼

52、的運行結果:C。(I變量的作用圍是整個for循環(huán))publicclassTestpublicvoidmethod()for(inti=0;i<3;i+)System.out.print(i);System.out.print(i);A.0122B.0123C.編譯錯誤D.沒有任何輸出69 .請看如下代碼classPersonprivateinta;publicintchange(intm)returnm;publicclassTeacherextendsPersonpublicintb;publicstaticvoidmain(Stringarg)Personp=newPerson();

53、Teachert=newTeacher();inti;/pointx下面哪些放在/pointx?行是正確的?D,EA,i=m;B,i=b;C,i=p.a;D,i=p.change(30);E,i=t.b;70 .下面那幾個函數(shù)是publicvoidmethod().的重載函數(shù)?A,DA.publicvoidmethod(intm).B.publicintmethod().C.publicvoidmethod2().D.publicintmethod(intm,floatf).71 .給出如下聲明:(D)Strings=“Exam;ple合法的代碼由哪些?As>>>=3Bs3=

54、"X"Cinti=s.iength()Ds=s+1072 .如下哪些不是java的關鍵字?BCA.constB.NULLC.falseD.thisE.native73 .表達式intm=0,1,2,3,4,5,6;B 數(shù)組下表是從零開場的但是數(shù)據下下面哪個表達式的值與數(shù)組下標量總數(shù)相等?標的總量和數(shù)據長度是一樣的A.m.length()B.m.lengthC.m.length()+1D.m.length+174 .方法resume(渙責恢復哪些線程的執(zhí)行D用resume是恢復被掛起的線程的讓這個線程繼續(xù)運行下去A通過調用stop()方法而停頓的線程。B通過調用sleep(彷法而停頓的線程。C通過調用wait()方法而停頓的線程。D通過調用suspend(訪法而停頓的線程。75 .有關線程的哪些表達是對的BDA一旦一個線程被創(chuàng)立,它就立即開場運行。B使用start()方法可以使一個線程成為可運行的,但是它不一定立即開場運行。C當一個線程因為搶先機制而停頓運行,它被放在可運行隊列的前面。D一個線程可能因為不同的原因停頓并進入就緒狀

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論