中兴面试测试题.doc

中兴面试测试题.doc

ID:52672838

大小:45.50 KB

页数:6页

时间:2020-03-29

中兴面试测试题.doc_第1页
中兴面试测试题.doc_第2页
中兴面试测试题.doc_第3页
中兴面试测试题.doc_第4页
中兴面试测试题.doc_第5页
资源描述:

《中兴面试测试题.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、面试测试题2(一)、选择题(4′×10):(1)Whichofthefollowingrangeofshortiscorrect?CA.-27~27-1B.0~216-1C.-215~215-1D.-231~231-1(2)Whichdeclarationsofidentifiersarelegal?ABEA.$personsB.TwoUsersC.*pointD.thisE._endline(3)Giventhefollowingcode:C1:publicvoidmodify(){2:inti,j,k;3:i=100;4:while(i>0){5:j=i*2;6:Syste

2、m.out.println("Thevalueofjis"+j);7:k=k+1;8:i--;9:}10:}Whichlinemightcauseanerrorduringcompilation?CA.line4B.line6C.line7D.line8(4)Whichofthefollowingansweriscorrecttoexpressthevalue8inoctalnumber?AA.010B.0x10C.08D.0x8(5)WhicharenotJavakeywords?ABA.TRUEB.sizeofC.constD.superE.void(6)Giventhef

3、ollowingcode:1:classPerson{2:publicvoidprintValue(inti,intj){//...}3:publicvoidprintValue(inti){//...}4:}5:publicclassTeacherextendsPerson{6:publicvoidprintValue(){//...}7:publicvoidprintValue(inti){//...}8:publicstaticvoidmain(Stringargs[]){9:Persont=newTeacher();10:t.printValue(10);11:}12:

4、}Whichmethodwillthestatementonline10call?DA.online2B.online3C.online6D.online7(7)Giventhefollowingcode:publicvoidtest(){try{oneMethod();System.out.println("condition1");}catch(ArrayIndexOutOfBoundsExceptione){System.out.println("condition2");}catch(Exceptione){System.out.println("condition3"

5、);}finally{System.out.println("finally");}}WhichwilldisplayifoneMethodrunnormally?ADA.condition1B.condition2C.condition3D.finally(8)Giventhefollowingcode:publicclassTest{voidprintValue(intm){do{System.out.println("Thevalueis"+m);}while(--m>10);}publicstaticvoidmain(Stringarg[]){inti=10;Testt

6、=newTest();t.printValue(i);}}Whichwillbeoutput?CA.Thevalueis8B.Thevalueis9C.Thevalueis10D.Thevalueis11(9)Giventhefollowingcode:publicclassPerson{staticintarr[]=newint[10];publicstaticvoidmain(Stringa[]){System.out.println(arr[1];)}}Whichstatementiscorrect?CA.Whencompilationsomeerrorwilloccur

7、.B.Itiscorrectwhencompilationbutwillcauseerrorwhenrunning.C.Theoutputiszero.D.Theoutputisnull.(10)Giventhefollowingcode:Strings="hello";Stringt="hello";charc[]={'h','e','l','l','o'};Whichreturntrue?ADA.s.equals(t);B.t.equals(c);C.s==t;D.t.equals(ne

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

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

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