预览加载中,请您耐心等待几秒...
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

在线预览结束,喜欢就下载吧,查找使用更方便

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

-JAVA程序员JAVA工程师面试必看 第一部分:选择题 QUESTIONNO:1 1、publicclassTest{ publicstaticvoidchangeStr(Stringstr){ str="welcome"; } publicstaticvoidmain(String[]args){ Stringstr="1234"; changeStr(str); System.out.println(str); } } Pleasewritetheoutputresult: QUESTIONNO:2 1.publicclassTest{ 2.staticbooleanfoo(charc){ 3.System.out.print(c); 4.returntrue; 5.} 6.publicstaticvoidmain(String[]argv){ 7.inti=0; 8.for(foo('A');foo('B')&&(i<2);foo('C')){ 9.i++; 10.foo('D'); 12.} 13.} 14.} Whatistheresult? A.ABDCBDCB B.ABCDABCD C.Compilationfails. D.Anexceptionisthrownatruntime. QUESTIONNO:3 1.classA{ 2.protectedintmethod1(inta,intb){return0;} 3.} WhichtwoarevalidinaclassthatextendsclassA?(Choosetwo) A.publicintmethod1(inta,intb){return0;} B.privateintmethod1(inta,intb){return0;} C.privateintmethod1(inta,longb){return0;} D.publicshortmethod1(inta,intb){return0;} E.staticprotectedintmethod1(inta,intb){return0;} QUESTIONNO:4 1.publicclassOuter{ 2.publicvoidsomeOuterMethod(){ 3.//Line3 4.} 5.publicclassInner{} 6.publicstaticvoidmain(String[]argv){ 7.Outero=newOuter(); 8.//Line8 9.} 10.} WhichinstantiatesaninstanceofInner? A.newInner();//Atline3 B.newInner();//Atline8 C.newo.Inner();//Atline8 D.newOuter.Inner();//Atline8//newOuter().newInner() QUESTIONNO:5 WhichmethodisusedbyaservlettoplaceitssessionIDinaURLthatiswrittentotheservlet’sresponseoutputstream? A.TheencodeURLmethodoftheHttpServletRequestinterface. B.TheencodeURLmethodoftheHttpServletResponseinterface. C.TherewriteURLmethodoftheHttpServletRequestinterface. D.TherewriteURLmethodoftheHttpServletResponseinterface. QUESTIONNO:6 Whichtwoareequivalent?(Choosetwo) A. B. C. D. E. F. G. QUESTIONNO:7 Whichofthefollowingstatementsregardingthelifecycleofasessionbeanarecorrect? 1.java.lang.IllegalStateExceptionisthrownifSessionContext.getEJBObject()isinvokedwhenastatefulsessionbeaninstanceispassivated. 2.SessionContext.g