Java工程师面试题-answer

Java工程师面试题-answer

ID:39550174

大小:190.50 KB

页数:9页

时间:2019-07-06

Java工程师面试题-answer_第1页
Java工程师面试题-answer_第2页
Java工程师面试题-answer_第3页
Java工程师面试题-answer_第4页
Java工程师面试题-answer_第5页
资源描述:

《Java工程师面试题-answer》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、考试时间:1小时考题(Java软件工程师)姓名:学校:        专业:      学历:毕业时间:      手机电话:       邮件地址:一、选择题NO.11.interfaceFoo{2.intk=0;3.}4.5.publicclassTestimplementsFoo{6.publicstaticvoidmain(Stringargs[]){7.inti;8.Testtest=newTest();9.i=test.k;10.i=Test.k;ll.i=Foo.k;12.}13.}14.

2、Whatistheresult?a)Compilationsucceeds.b)Anerroratline2causescompilationtofail.c)Anerroratline9causescompilationtofail.d)Anerroratline10causescompilationtofail.e)Anerroratline11causescompilationtofail.Answer:(a)NO.21.publicclassTest{2.publicintaMethod(){3

3、.staticinti=0;4.i++;5.returni;6.}7.publicstaticvoidmain(Stringargs[]){8.Testtest=newTest();9.test.aMethod();l0.intj=test.aMethod();ll.System.out.println(j);92008校招试题考试时间:1小时12.}13.}Whatistheresult?()a)Compilationwillsucceedandtheprogramwillprint"0"b)Comp

4、ilationwillsucceedandtheprogramwillprint"1'c)Compilationwillsucceedandtheprogramwillprint"2"d)Compilationwillfail.Answer:(c、e)NO.3WhichofthefollowingstatementsistrueregardingMyServlet?()importjavax.servlet.*;importjavax.servlet.http.*:importjava.io.*;pub

5、licclassMyServletextendsHttpServletimplementsSingleThreadModel{StringmyName;publicvoidservice(HttpServletRequestreq,HttpServletResponseres)throwsServletException,IOException{response.setContentType("text/plain");PrintWriterout=res.getWriter();myName=req.

6、getParameter("name");sayHello(out);out.close();}publicvoidsayHello(PrintWriterout){out.println("Hello"+myName);}}a.)MyServletisthreadsafe.b.)MyServletisnotthreadsafebecausemyNameisaninstancevariable.c.)MyServletisnotthreadsafebecauseMyServletimplementsSi

7、ngleThreadModel.d.)Noneoftheabove.Answer:(a)NO.4What’stheclassnameofmaincontrollerinstruts?a)MainServletb)MainServletc)StrutsServletd)ActionServletAnswer:(d)92008校招试题考试时间:1小时NO.5WhichstatementiscorrectwhenanobjectispersistedtoDatabasewithhibernateframewo

8、rk?()Session.save(Objecto)Session.load(Objecto)Session.update(Objecto)Session.store(Objecto)Answer:(a)NO.6Whichpatternwouldyouusetocreateacomplexobjectandhavetheassemblyandpartsindependent?A.PrototypeB.SingletonC.BuilderD.

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

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

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