东华软件笔试题.doc

东华软件笔试题.doc

ID:58965535

大小:37.50 KB

页数:5页

时间:2020-10-27

东华软件笔试题.doc_第1页
东华软件笔试题.doc_第2页
东华软件笔试题.doc_第3页
东华软件笔试题.doc_第4页
东华软件笔试题.doc_第5页
资源描述:

《东华软件笔试题.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、北京东华合创数码科技股份有限公司笔试试卷(Java语言部分)姓名:联系方式:1.whichwon’tcauseacompilerwarningorerror?(多选)a)floatf=1.3;b)charc=‘a’;c)byteb=257;d)booleanb=null;e)inti=10;2.请选择下面这段代码的输出结果?inti=0;switch(i){case0:System.out.println("zero");case1:System.out.println("one");case2:

2、System.out.println("two");break;case3:System.out.println("three");}1)zero2)zero,one3)zero,one,two4)zero,one,two,three3.publicclassTest{privatestaticintj=0;publicstaticbooleanmethodB(intk){j+=k;returntrue;}publicstaticvoidmethodA(inti){booleanb;b=i>10&

3、methodB(1);b=i>10&&methodB(2);}publicstaticvoidmain(Stringargs){methodA(0);17)}}whatisthevalueofjatline17?1)02)13)24)34.Ifweexecutethecodebelowwith“javaTestRedGreenBlue”,whatistheresult?publicclassTest{publicstaticvoidmain(String[]args){Stringfoo=args

4、[1];Stringbar=args[2];Stringbaz=args[3];}}whatisthevalueofbaz?A.bazhasvalueof""B.bazhasvalueofnullC.bazhasvalueof"Red"D.bazhasvalueof"Blue"E.bazhasvalueof"Green"F.thecodedoesnotcompileG.theprogramthrowanexception5.请选择下面这段代码的输出结果?1)publicclassTest{2)pu

5、blicstaticvoidmain(String[]args){3)classFoo{4)publicinti=3;5)}6)Objecto=(Object)newFoo();7)Foofoo=(Foo)o;8)System.out.println(foo.i);9)}10)}A.compileerroratline6B.compileerroratline7C.compileerroratline8D.printout36.intindex=1;String[]test=newString[3

6、];Stringfoo=test[index];whatistheresultoffoo?A.""B.nullC.throwaExceptionD.notcompile7.下面的五个选择中哪两个描述是正确的?(多选)A.staticinnerclassrequiresastaticinitializerB.AstaticinnerclassrequiresaninstanceoftheenclosingclassC.Astaticinnerclasshasnoreferencetoaninstan

7、ceoftheenclosingclassD.Astaticinnerclasshasaccessstothenon-staticmemberoftheotherclassE.staticmembersofastaticinnerclasscanbereferencedusingtheclassnameofthestaticinnerclass8.请选择下面这段代码的输出结果?classA{publicintgetNumber(inta){returna+1;}}classBextendsA{pu

8、blicintgetNumber(inta,charc){returna+2;}publicstaticvoidmain(String[]args){Bb=newB();System.out.println(b.getNumber(0));}}A.compilationsucceedsand1isprintedB.compilationsucceedsand2isprintedC.Anerroratline8causecompilationtofailD.Anerroratline

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

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

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