您好,欢迎访问三七文档
东南融通J2EE面试试题保密1/12网龙笔试题:1、实现链表的创建,删除和逆序等。#includeiostream#includeassert.husingnamespacestd;typedefstructstu{intdata;structstu*next;}node,list;node*creatlist(intn){node*h,*p,*s;h=newnode;h-next=NULL;p=h;cout“pleaseinput”n”numbers.”;for(inti=0;in;i++){s=newnode;cins-data;s-next=NULL;p-next=s;p=s;}returnh;}voiddeletelist(node*s,inta){node*p;while(s-data!=a){p=s;s=s-next;}if(s==NULL){cout“noa”;}else{p-next=s-next;deletes;东南融通J2EE面试试题保密2/12}}voiddisplay(node*h){h=h-next;while(h!=NULL){couth-dataends;h=h-next;}coutendl;}node*reverse(node*h){node*p,*q,*s;p=h-next;q=p-next;while(q-next!=NULL){s=q-next;q-next=p;p=q;q=s;}q-next=p;h-next-next=NULL;h-next=q;returnh;}intmain(){intn;node*h;cout“pleaseinputthenumber:”;cinn;h=creatlist(n);display(h);cout“delete?”;cinn;deletelist(h,n);display(h);h=reverse(h);display(h);return0;东南融通J2EE面试试题保密3/12}2、字符串逆序输入文件是in.txt,内容例如如下:hello,everyone.mynameisshen,he.ni,ne?则倒序之后为:everyone.hello,he.shen,isnamemyne?ni,源程序,自己实现的,算法是别人的。呵呵#includeiostream#includefstream#includevector#includecstring#includestringusingnamespacestd;intmain(){ifstreaminFile;ofstreamoutFile;char*fName;string::size_typeb,e;charch;stringline;vectorstringsvec;inFile.open(”in.txt”);while(getline(inFile,line))//先获取每一行字符,并存入容器中{svec.push_back(line);}inFile.close();outFile.open(”out.txt”);vectorstring::iteratoriter=svec.begin();while(iter!=svec.end()){b=0;e=(*iter).size()–1;while(be)//将该行字符整体翻转{ch=(*iter)[b];(*iter)[b]=(*iter)[e];(*iter)[e]=ch;b++;东南融通J2EE面试试题保密4/12e–;}b=0;e=0;string::size_typei=0;while((*iter)[i]){if((*iter)[i]!=‘‘)//找到一行的一个单词{b=i;while((*iter)[i]!=‘‘&&(*iter)[i])i++;i–;e=i;}while(be)//将这个单词翻转{ch=(*iter)[b];(*iter)[b]=(*iter)[e];(*iter)[e]=ch;b++;e–;}i++;}outFile*iterendl;++iter;}return0;}新大陆面试题:(一)技术面试struts如何表现MVC模式的?Tomcat的部署?UML有哪些图?Struts框架的好处(优点)?答:1、是开源软件,使开发者能更深入的了解其内部实现机制。2、Taglib是Struts的标记库,灵活动用,能大大提高开发效率;通过一个配置文件,即可把握整个系统各部分之间的联系,这对于后期的维护有着莫大的好处。尤其是当另一批开发者接手这个项目时,这种优势体现得更加明显。4.提供Exception处理机制.5.数据库链接池管理6.支持I18N东南融通J2EE面试试题保密5/12Struts+Hibernate框架的优势?答:这两种架构相结合很好地解决了系统的开发效率低、不易于维护、低耦合及可移植性差等问题.介绍一下AJAX?答:AJAX(AsynchronousJavaScriptandXML)被赢得广泛的认可,其原因是由于它缩短了Web应用程序和桌面应用程序之间的差距,并在其中充分结合可实现的技术和丰富的用户体验。AJAX是多种技术的综合,它打破了页面刷新的范式,使您的用户快速方便的与Web应用程序交互。CVS配置与使用?POJO是什么?答:简单的Java对象(PlainOldJavaObjects),POJO对象有时也被称为Data对象,大量应用于表现现实中的对象。概要设计与详细设计等文档的主要包含内容?(二)笔试内容Java基础:Char变量.ClassLoader与Class.JDO.GC.等SQL方面:SQL全称.查询语句.Groupby.having.updatesetJSP方面:静态include与动态include第一部分:Java基础知识1.Whatwillhappenwhenyouattempttocompileandrunthefollowingcode?publicclassTest{static{intx=5;}staticintx,y;publicstaticvoidmain(Stringargs[]){x--;myMethod();System.out.println(x+y+++x);}publicstaticvoidmyMethod(){y=x+++++x;}东南融通J2EE面试试题保密6/12}A.compiletimeerrorB.prints:1C.prints:2D.prints:3E.prints:7F.prints:82.Whichofthefollowingcollectionclassesfromjava.utilpackageareThreadsafe?(Choosetwo)A.VectorB.ArrayListC.HashMapD.Hashtable3.Whichofthefollowingtypesisprimitivejavatype?(Choosetwo)AStringBintCcharDShort4.Whichtwodemonstrateahasarelationship?(Choosetwo)A.publicinterfacePerson{}publicclassEmployeeextendsPerson{}B.publicinterfaceShape{}publicinterfaceRectandleextendsShape{}C.publicinterfaceColorable{}publicclassShapeimplementsColorable{}D.publicclassSpecies{}publicclassAnimal{privateSpeciesspecies;}E.interfaceComponent{}classContainerimplementsComponent{privateComponent[]children;}5.Whatistheresultwhenyoucompileandrunthefollowingcode?publicclassThrowsDemo{东南融通J2EE面试试题保密7/12staticvoidthrowMethod(){System.out.println(InsidethrowMethod.);thrownewIllegalAccessException(demo);}publicstaticvoidmain(Stringargs[]){try{throwMethod();}catch(IllegalAccessExceptione){System.out.println(Caught+e);}}}A.compileerrorB.runtimeerrorC.compilesuccessfully,nothingisprinted.D.insidethrowMethodfollowedbycaught:java.lang.IllegalAccessException:demo6.Whichtwostatementsaretruefortheclassjava.util.TreeSet?(Choosetwo)A.Theelementsinthecollectionareordered.B.Thecollectionisguaranteedtobeimmutable.C.Theelementsinthecollectionareguaranteedtobeunique.D.Theelementsinthecollectionareaccessedusingauniquekey.E.Theelementsinthecollectionareguaranteedtobesynchronized点评:TreeSet类实现了Set接口。Set的特点是其中的元素惟一,选项C正确。由于采用了树形存储方式,将元素有序地组织起来,所以选项A也正确。7.Whatwillbeprintedwhenyouexecutethefollowingcode?classX{Yb=newY();X(){东南融通J2EE面试试题保密8/12System.out.print(X);}}classY{Y(){System.out.print(Y);}}publicclassZextendsX{Yy=newY();Z(){System.out.print(Z);}publicstaticvoidmain(String[]args){newZ();}}A.ZB.YZC.XYZD.YXYZ8.whichtwodeclaretionspreventtheoverridingofamethod?A.finalvoidmethoda(){}B.voidfinalmethoda(){}C.staticvoidmethoda(){}D.staticfinalvoidmethoda(){}E.finalabstractvoidmethoda(){}9.Youwantaclasstohaveaccesstomembersofanotherclassinthesamepackagewhichisthemostrestrictiveaccessmodifierthatwillaccomplishthisobjective?A.publicB.privateC.protectedD.transientE.Noaccessmodifierisrequired10.whichtwointerfacesprovidethecapabilitytostoreobjectsusingakey-valuepair?东南融通J2EE面试试题保密9/12A.java.util.MapB.java.util.SetC.java.util
本文标题:J2EE+招聘试题
链接地址:https://www.777doc.com/doc-1036363 .html