




如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
2022java开发工程师模拟试题java开发工程师模拟试题2022Java平台是基于Java语言的`平台。这样的平台目前特别流行,因此微软公司推出了与之竞争的.NET平台以及仿照Java的C#语言。下面是我收集的关于java开发工程师模拟试题,希望大家仔细阅读!1.Whichstatementaboutthegarbagecollectionmechanismaretrue?A.Garbagecollectionrequireadditionalprogramcodeincaseswheremultiplethreadsarerunning.B.Theprogrammercanindicatethatareferencethroughalocalvariableisnolongerofinterest.C.TheprogrammerhasamechanismthateXPlicitandimmediatelyfreesthememoryusedbyJavaobjects.D.ThegarbagecollectionmechanismcanfreethememoryusedbyJavaObjectatexpectabletime.E.ThegarbagecollectionsystemneverreclaimsmemoryfromobjectswhilearestillAccessibletorunninguserthreads.2.Givethefollowingmethod:1)publicvoidmethod(){2)Stringa,b;3)a=newString(;helloworld;);4)b=newString(;gameover;);5)System.out.println(a+b+;ok;);6)a=null;7)a=b;System.out.println(a);9)}Intheabsenceofcompileroptimization,whichistheearliestpointtheobjectareferredisdefinitelyhandtobegarbagecollection.A.beforeline3B.beforeline5C.beforeline6D.beforeline7E.Beforeline93.Whichstatementaboutlisteneristrue?A.Mostcomponentallowmultiplelistenerstobeadded.B.Ifmultiplelistenerbeaddtoasinglecomponent,theeventonlyaffectedonelistener.C.Componentdon’tallowmultiplelistenerstobeadd.D.ThelistenermechanismallowsyoutocallanaddXXXListenermethodasmanytimesasisneeded,specifyingasmanydifferentlistenersasyourdesignrequire.4.Givethefollowingcode:publicclassExample{publicstaticvoidmain(Stringargs[]){intl=0;do{System.out.println(;Doingitforlis:;+l);}while(--l>0)System.out.println(;Finish;);}}Whichwellbeoutput:A.Doingitforlis3B.Doingitforlis1C.Doingitforlis2D.Doingitforlis0E.Doingitforlis–1F.Finish5.Givethecodefragment:1)switch(x){2)case1:System.out.println(;Test1;);break;3)case2:4)case3:System.out.println(;Test2;);break;5)default:System.out.println(;end;);6)}whichvalueofxwouldcause;Test2;totheoutput:A.1B.2C.3D.default6.Giveincompletedmethod:1)2){if(unsafe()){//dosomething…}3)elseif(safe

努力****梓颖
实名认证
内容提供者


最近下载