新大陆java工程师试卷

新大陆java工程师试卷

ID:5849813

大小:119.50 KB

页数:12页

时间:2017-12-26

新大陆java工程师试卷_第1页
新大陆java工程师试卷_第2页
新大陆java工程师试卷_第3页
新大陆java工程师试卷_第4页
新大陆java工程师试卷_第5页
资源描述:

《新大陆java工程师试卷》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、YW2010-JavaJava软件工程师试卷B(2014)考生必读:请勿在本试卷中涂写,答案写在答题卷中考试时间90分钟1选择题(每题2分)1.1JAVA/JSP编程部分1、Given:publicclassPass{publicstaticvoidmain(String[]args){intx=5;Passp=newPass();p.doStuff(x);System.out.print(”mainx=“+x);}voiddoStuff(intx){System.out.print(”doStuffx=“+x+

2、+);}}Whatistheresult?A.Compilationfails.B.Anexceptionisthrownatruntime.C.doStuffx=6mainx=6D.doStuffx=5mainx=5E.doStuffx=5mainx=6F.doStuffx=6mainx=52、Given:classTestA{publicvoidstart(){System.out.println(”TestA”);}}publicclassTestBextendsTestA{publicvoidstart(

3、){System.out.println(”TestB”);}publicstaticvoidmain(String[]args){((TestA)newTestB()).start();}}共12页注意保密严禁公开第12页YW2010-JavaWhatistheresult?A.TestAB.TestBC.Compilationfails.D.Anexceptionisthrownatruntime.1、Given:publicclassTest{publicstaticvoidmain(String[]arg

4、s){intx=5;booleanb1=true;booleanb2=false;if((x==4)&&!b2)System.out.print(”l“);System.out.print(”2“);if((b2=true)&&b1)System.out.print(”3“);}}Whatistheresult?A.2B.3C.12D.23E.123F.Compilationfails.G.Auexceptionalisthrownatruntime.2、WhichManclassproperlyrepresen

5、tstherelationship“ManhasabestfriendwhoisaDog”?A.classManextendsDog{}B.classManimplementsDog{}C.classMan{privateBestFrienddog;}D.classMan{privateDogbestFriend;}E.classMan{privateDog}F.classMan{privateBestFriend}3、Given:classOne{publicOne(){Sys

6、tem.out.print(1);}}classTwoextendsOne{publicTwo(){System.out.print(2);}}共12页注意保密严禁公开第12页YW2010-JavaclassThreeextendsTwo{publicThree(){System.out.print(3);}}publicclassNumbers{publicstaticvoidmain(String[]argv){newThree();}}Whatistheresultwhenthiscodeisexecute

7、d?A.1B.3C.123D.321E.Thecoderunswithnooutput.1、Given:classLine{publicstaticclassPoint{}}classTriangle{//insertcodehere}Whichcode,insertedatline6,createsaninstanceofthePointclassdefinedinLine?A.Pointp=newPoint();B.Line.Pointp=newLine.Point();C.ThePointclasscann

8、otbeinstatiatedatline15.D.Line1=newLine();1.Pointp=new1.Point();2、Howcanyouforcegarbagecollectionofanobject?a、Garbagecollectioncannotbeforcedb、CallSystem.gc().c、CallSystem.gc(),passingina

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

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

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