您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 质量控制/管理 > Sun_Java程序员认证考试题库 - 共83页
1-1JavaSwing(GUI)Java1-2Java1JDKAJavaBAPICJavaEEAPIDJava2JDKJREJVMAJDKJREJVMJREBJREJDKJDKJVMCJREJDKJVMJREDJDKJREJREJVM3javaAjavacBjdbCjavadocDjunit4JDKjavadocAJavaBJavaCJavaDJava5JavaAjavalangBjavaxservlet.httpCjava.ioDjavasql1-36JDKJavaAXMLBcDHTML7JVMAJVMBJVMCJVMJavaJavaDJVMJavaJava8JavaAJavaSolarisBJavaWindowsCJavaJavaDJavaJava9AppletJavaA-AppletJavaBAppletJavaWebCAppletJavaWebDAppletJavaSE10JavaHotSpotAJavaHotSpotJavaBJavaHotSpotJavaCJavaHotSpotDJavaHotSpot1-411PATHA.B.C.*D:|12CLASSPATHABCD13JVMJavaABCD14JavaAjava12Bjavac12Cjava12Djava1+215JavaAJava.javaBJavaCJavajavaDJavaJava1-5lC2D3A4ASACD6D7AC8C9B10AD11A12B13D14C15AB1-61JavaAintBStringCdoubleDboolean2intA\u03A6B077COxABBCD203AuserNameB2testC$changeD_password4JavaAB--C***/D/kk**/5JavaAgotoBsizeofCinstanceofDvolatile1-76Linel:inta_really_really_really_long_variable_name=5;Line2:int_hi=6Line3:intbig=Integer.getlnteger(7”);Line4int$dollars=8;line5:int%opercent=9;ALine1BLine3C.Line4D.Line571.classTop{2staticintx=l3.publicTop(inty){x*=3;}4.}5.classMiddleextendsTop{6.publicMiddle(){x+=1;)7.publicstaticvoidmain(String[]args){8.Middlem=newMiddle();9.System.out.println(x);IO.}II.}A.1B.2C3D81classPasserf2staticfinalintX=53.publicstaticvoidmain(String[]args){4newPasser()go(x);5.System.out.print(x);6)7voidgo(intx){8System.out.print(x++);9}10.}1-8A55B56C65D6691classWrenchf2.publicstaticvoidmain(String[]args){3.Wrenchw=newWrench();Wrenchw2=newWrench();4w2=go(w,w2)5.System.out.print(w2==w);6}7.staticWrenchgo(Wrenchwrl,Wrenchwr2){8.Wrenchwr3=wrl;wrl=wr2;wr2=wr3;9returnwr3;10}11}A.falseBtrueC.D105classWrench2{6intsize;7.publicstaticvoidmain(String[]args){8.Wrench2w=newWrench2();9w.size=II;IO.Wrench2w2=go(w,w.size);II.System.out.print(w2.size);12)13.staticWrench2go(Wrench2wr.ints){14.S=12;15returnwr;16.}17.}1-9A.11B.12cD11classTest2fpublicstaticvoidmain(String[]args){shortab,Ca=l;b=2;C=a+ba+=2}}Aa=1BC=a+bCa+=2;D.shortab,C121-2/5+2'k5A.10.6B.9.8C.913Strings=123Stringsl=S+456;slA.123456B.579CD1-1014floatAIntegerBDoubleCFloatDCharacter15.1classTest4{2.publicstaticvoidmain(String[]args){3booleanX=true;4booleany=false;5shortZ=42;67.if((z++==42)(y=true))z++;8.if((x=false)||(++z==45))z++;910.System.out.println(¨z=”+z);II.}12.}A.Z=42B.z=44CZ=45Dz=461-111B2A3B4ACD5B6D7D8A9B10A11B12D13A14C15D1-121classTestApp{publicstaticvoidmain(String[]args){for(inti=0;ilO;i++){if(i==3)break;System.out.print(i);}}}A0123B012456789C0123456789D0122classTestApp{publicstaticvoidmain(String[]args){intx=6if(xl)System.out.println(xl);elseif(x5)System.out.println(x5);elseif(x10)System.out.println(xlO);elseif(x29)System.out.println(x29);elseSystem.outprintln;}}Ax5BxlCx10Dx291-133classTestApp{publicstaticvoidmain(String[]args){int[5]myarray={10,11,12,13,14);intsum=0;for(intxmyarray)sum+=x;System.out.println(sum=+sum);}}Asum=10Bsum=70Csum=60D4Aints[10];Bint[10]sCint[5]s={l,2,3,4,5};Dints[];5arrayAarray.sizeBarray.length-lCarray.size-lDarraylength6classTestApp{publicstaticvoidmain(String[]args){intX=5switch(x){caselcase2case3System.outprintln;break;case4case51-14case6System.outprintlnbreak;defaultSystem.outprintln;break;)})A.BcD7myArray36int[]myArray=newint[3];myArray=newint[6]AmyArray3633BmyArray3633CmyArrayDmyArray36381classIfs{2publicstaticvoidmain(String[]args){3booleanstate=false;4inti=25if((++i2)(state=true))6i++;7if((++i4)ll(state=false))8i++;9System.out.println(i);10}11}1-15A6B5C4D93publicclassTester{4.publicstaticvoidmain(String[]args){5intx-5;6.Integerxl=x;Integerx2=x;7.intx3=newInteger(5);8.system..ut.print(x1.equals(x));9.system..ut.print(xl==x);lu.system..ut.print(x2.equals(xl));11.system..ut.print(x2==xl);12-system..ut.print(x2==x3);13-system..ut.print(x2.equals(x3));“l4}15}AB.falsefalsetruetruetruetrueCtruetruetruetruetruetrueD.falsefalsetruetruetruefalseE.truefalsetruefalsefalsetrueF.101classRectangle{2'publicstaticV.idmain(string[]args){3int[]x=(123);4x[1]=(x[1]1)?x[2]:O;5System.outprintln(x[1]);6}7}1-16A3B2C1D0111classOutput(2publicstaticvoidmain(String[]args){3inti=54System.out.print(4+i+);5System.out.print(i+5+7);6System.out.println(i+8);7}8}A99722B955758C4510758D45972212AString[]names={zhang,wang,li);BStringnames[]=newString[3];names[O]=zhang;names[1]=wang;names[2]=li;CString[3]names={zhang,wang,li};D131classWhileTests{2publicstaticvoidmain(String[]args){3intX=54while(++x4){5--x;6}7System.out.println(x=+x);8}9}1-17A.X=6B.X=5C.X=2D141classTest2f2publicstaticvoidmain(String[]args){3booleanX=true;4booleany=false;5shortZ=20;67if((x==true)&(y=true))z++;8if((y==true)||(++z==22))z++;910System.out.println(z=+z)11}12}A.Z=21B.z=22C.z=23DZ=2415.1classFoo{2publicstaticvoidmain(String[]args){3intx=O4inty=45for(intz=0;z3Z++;X++){6if(x1&++y10)7y++;8}9System.out.println(y);10}11}A7B8C10D121-18ID2B3C4CD5B6B7D8A9C11C12C13A14B15B1-191ABCD2AccountAAccount(Stringname){)BAccount(Stringname)CAccount(name)()DNewAccount(Stringname){)3AccountAclassAccountfname;amount;)BclassAccount{Stringname=l.0doubleamount=Mike;)CclassAccountfStringname;doubleamount;)DclassAccount{Stringname=Mike,,,
本文标题:Sun_Java程序员认证考试题库 - 共83页
链接地址:https://www.777doc.com/doc-5838671 .html