欢迎来到天天文库
浏览记录
ID:17980296
大小:66.50 KB
页数:27页
时间:2018-09-12
《java程序员面试题》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、java程序员面试题第一部分:选择题 QUESTIONNO:1 1、publicclassTest{ publicstaticvoidchangeStr(Stringstr){ str="welcome";九塾教育http://rooms9.com } publicstaticvoidmain(String[]args){ Stringstr="1234"; changeStr(str); System.out.println(str); } } Pleasewritetheoutp
2、utresult: QUESTIONNO:2 1.publicclassTest{ 2.staticbooleanfoo(charc){ 3.System.out.print(c);九塾教育http://rooms9.com 4.returntrue; 5.} 6.publicstaticvoidmain(String[]argv){ 7.inti=0; 8.for(foo('A');foo('B')&&(i<2);foo('C')){ 9.i++;beconsistentwithint
3、hesamedisk.Alternateunifiedcorerequirementsplacedontheterminalstripterminals,onlineidentityandensurethecoppercoreisnotexposed.6.4.6enclosurewithinthesametothecablecoreprovidesbindingintoacircle,harnesstiespacingisgenerally100mm;branchofficesshallbebindingo
4、nbothends,eachcore 10.foo('D'); 12.} 13.}九塾教育http://rooms9.com 14.} Whatistheresult? A.ABDCBDCB B.ABCDABCD C.Compilationfails. D.Anexceptionisthrownatruntime.QUESTIONNO:3 1.classA{ 2.protectedintmethod1(inta,intb){return0;} 3.} Whichtwoarevali
5、dinaclassthatextendsclassA?(Choosetwo) A.publicintmethod1(inta,intb){return0;} B.privateintmethod1(inta,intb){return0;} C.privateintmethod1(inta,longb){return0;} D.publicshortmethod1(inta,intb){return0;} E.staticprotectedintmethod1(inta,intb){return0;
6、} QUESTIONNO:4 1.publicclassOuter{ 2.publicvoidsomeOuterMethod(){ 3.//Line3 4.}beconsistentwithinthesamedisk.Alternateunifiedcorerequirementsplacedontheterminalstripterminals,onlineidentityandensurethecoppercoreisnotexposed.6.4.6enclosurewithinthesame
7、tothecablecoreprovidesbindingintoacircle,harnesstiespacingisgenerally100mm;branchofficesshallbebindingonbothends,eachcore 5.publicclassInner{} 6.publicstaticvoidmain(String[]argv){ 7.Outero=newOuter(); 8.//Line8 9.}九塾教育http://rooms9.com 10.} Whichin
8、stantiatesaninstanceofInner? A.newInner();//Atline3 B.newInner();//Atline8 C.newo.Inner();//Atline8 D.newOuter.Inner();//Atline8//newOuter().newInner() QUESTIONNO:5 Whichmethodisusedbyaservlettoplaceits
此文档下载收益归作者所有