Java模拟题new

Java模拟题new

ID:37845503

大小:105.50 KB

页数:13页

时间:2019-06-01

Java模拟题new_第1页
Java模拟题new_第2页
Java模拟题new_第3页
Java模拟题new_第4页
Java模拟题new_第5页
资源描述:

《Java模拟题new》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、Java程序员认证模拟题(onlyfortrainning)一.说明:(真实考试)1.考试形式:网络计算机2.考题形式:多选,单选,简答3.题量:604.考试时间:120分钟二.模拟题1.Whichstatementaboutthegarbagecollectionmechanismaretrue?A.Garbagecollectionrequireadditionalprogramecodeincaseswheremultiplethreadsarerunning.B.Theprogrammercanindicatethatar

2、eferencethroughalocalvariableisnolongerofinterest.C.TheprogrammerhasamechanismthatexplicityandimmediatelyfreesthememoryusedbyJavaobjects.D.ThegarbagecollectionmechanismcanfreethememoryusedbyJavaObjectatexplectiontime.E.Thegarbagecollectionsystemneverreclaimsmemoryfrom

3、objectswhilearestillaccessibletorunninguserthreads.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;8)System.out.println(a);9)}Intheabsenceofcompileroptimizati

4、on,whichistheearliestpointtheobjectareferedisdefinitelyelibiletobegarbagecollection.A.beforeline3B.beforeline5C.beforeline6D.beforeline7E.Beforeline93.Intheclassjava.awt.AWTEvent,whichistheparentclassuponwhichjdk1.1awteventsarebasedthereisamethodcalledgetIDwhichphrase

5、accuratelydescribesthereturnvalueofthismethod?A.Itisareferencetotheobjectdirectlyaffectedbythecauseoftheevent.B.Itisanindicationofthenatureofthecauseoftheevent.C.Itisanindicationofthepositionofthemousewhenitcausedtheevent.D.Inthecaseofamouseclick,itisanindicationofthe

6、textunderthemouseatthetimeoftheevent.E.Ittellsthestateofcertainkeysonthekeybordatthetimeoftheevent.F.Itisanindicationofthetimeatwhichtheeventoccurred.4.Whichstatementaboutlisteneristrue?A.Mostcomponentallowmultiplelistenerstobeadded.B.Ifmultiplelistenerbeaddtoasinglec

7、omponent,theeventonlyaffectedonelistener.C.Componentdon’tallowmultiplelistenerstobeadd.D.ThelistenermechanismallowsyoutocallanaddXxxxListenermethodasmanytimesasisneeded,specifyingasmanydifferentlistenersasyourdesignrequire.5.Givethefollowingcode:publicclassExample{pub

8、licstaticvoidmain(Stringargs[]){intl=0;do{System.out.println(“Doingitforlis:”+l);}while(--l>0)System.out.println(“Finish”);}

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。