版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、東南融通J2EE面試試題保密 17/17網(wǎng)龍筆試試題:1、實(shí)現(xiàn)現(xiàn)鏈表的的創(chuàng)建,刪刪除和逆逆序等。#inccludde#inccluddeusinng nnameespaace stdd;typeedeff sttrucct sstuint datta;struuct stuu *nnextt;nodde, lisst;nodee* ccreaatliist(intt n)nodee *hh, *p, *s;h = neww noode;h-nnextt = NULLL;p = h;coutt “ppleaase inpput ” nn ” nummberrs.”;for(intt i = 00
2、; ii s-datta;s-nnextt = NULLL;p-nnextt = s;p = s;retuurn h;voidd deeletteliist (noode *s, innt aa)nodee *pp;whille(ss-ddataa != a)p = s;s = s-nexxt;if(ss = NUULL)coutt nnextt = s-nexxt;deleete s;voidd diispllay(nodde *h)h = h-nexxt;whille(hh != NUULL)coutt daata nexxt;coutt nexxt;q = p-nexxt;whille(
3、qq-nnextt != NUULL)s = q-nexxt;q-nnextt = p;p = q;q = s;q-nnextt = p;h-nnextt-nnextt = NULLL;h-nnextt = q;retuurn h;int maiin()int n;nodee *hh;coutt n;h= ccreaatliist(n);dispplayy(h);coutt n;deleetellistt(h, n);dispplayy(h);h = revversse(hh);dispplayy(h);retuurn 0;2、字符符串逆序序輸入文件件是inn.txxt,內(nèi)內(nèi)容例如如如下:he
4、lllo, eveeryoone.my nnamee iss shhen, hee.ni, ne?則倒序之之后為:everryonne. helllo,he. sheen, is namme mmyne? ni,源程序,自自己實(shí)現(xiàn)現(xiàn)的,算算法是別別人的。呵呵#inccludde#inccludde#inccludde#inccludde#inccluddeusinng nnameespaace stdd;int maiin()ifsttreaam iinFiile;ofsttreaam ooutFFilee;charr *ffNamme;striing:siize_typpe bb,e;cha
5、rr chh;striing linne;vecttor ssvecc;inFiile.opeen(”iin.ttxt”);whille(ggetllinee(innFille, linne) /先獲取取每一行行字符,并并存入容容器中svecc.puush_bacck(llinee);inFiile.cloose();outFFilee.oppen(”ouut.ttxt”);vecttor:iteerattor iteer = svvec.beggin();whille(iiterr != svvec.endd()b = 0;e = (*iiterr).ssizee() 11;whille(
6、b e) /將該該行字符符整體翻翻轉(zhuǎn)ch = (*iteer)b;(*itter)b = (*iiterr)ee;(*itter)e = ch;b+;e;b = 0;e = 0;striing:siize_typpe ii = 0;whille( (*iiterr)ii )if(*itter)i != ) /找到到一行的的一個(gè)單單詞b = i;whille(*itter)i != & (*itter)i)i+;i;e = i;whille (b e) /將這個(gè)個(gè)單詞翻翻轉(zhuǎn)ch = (*iteer)b;(*itter)b = (*iiterr)ee;(*itter)e = ch;b+;e;i+;
7、outFFilee *iiterr enndl;+itter;retuurn 0;新大陸面面試題:(一)技技術(shù)面試試struuts如如何表現(xiàn)現(xiàn)MVCC模式的的?Tomccat的的部署?UML有有哪些圖圖?Struuts框框架的好好處(優(yōu)優(yōu)點(diǎn))?答:1、是開源源軟件,使使開發(fā)者者能更深深入的了了解其內(nèi)內(nèi)部實(shí)現(xiàn)現(xiàn)機(jī)制。 2、TTagllib是是Strrutss的標(biāo)記記庫,靈靈活動(dòng)用用,能大大大提高高開發(fā)效效率;通通過一個(gè)個(gè)配置文文件,即即可把握握整個(gè)系系統(tǒng)各部部分之間間的聯(lián)系系,這對對于后期期的維護(hù)護(hù)有著莫莫大的好好處。尤尤其是當(dāng)當(dāng)另一批批開發(fā)者者接手這這個(gè)項(xiàng)目目時(shí),這這種優(yōu)勢勢體現(xiàn)得得更加明明顯
8、。 4. 提供EExceeptiion處處理機(jī)制制 . 5. 數(shù)據(jù)庫庫鏈接池池管理 6. 支持II18NN Struuts+Hibbernnatee框架的的優(yōu)勢?答:這兩兩種架構(gòu)構(gòu)相結(jié)合合很好地地解決了了系統(tǒng)的的開發(fā)效效率低、不易于于維護(hù)、低耦合合及可移移植性差差等問題題.介紹一下下AJAAX?答:AJJAX(Asyynchhronnouss JaavaSScriipt andd XMML)被被贏得廣廣泛的認(rèn)認(rèn)可,其其原因是是由于它它縮短了了Webb應(yīng)用程程序和桌桌面應(yīng)用用程序之之間的差差距,并并在其中中充分結(jié)結(jié)合可實(shí)實(shí)現(xiàn)的技技術(shù)和豐豐富的用用戶體驗(yàn)驗(yàn)。AJAXX是多種種技術(shù)的的綜合,它它打破
9、了了頁面刷刷新的范范式,使使您的用用戶快速速方便的的與 WWeb 應(yīng)用程程序交互互。CVS配配置與使使用?POJOO是什么么?答:簡單單的Jaava對對象(PPlaiin OOld Javva OObjeectss),PPOJOO對象有有時(shí)也被被稱為DDataa對象,大大量應(yīng)用用于表現(xiàn)現(xiàn)現(xiàn)實(shí)中中的對象象。概要設(shè)計(jì)計(jì)與詳細(xì)細(xì)設(shè)計(jì)等等文檔的的主要包包含內(nèi)容容?(二)筆筆試內(nèi)容容Javaa基礎(chǔ):Chaar變量量.CllasssLoaaderr與Cllasss.JDDO.GGC.等等SQL方方面:SSQL全全稱.查查詢語句句. GGrouup bby .havvingg.uppdatte ssetJS
10、P方方面:靜靜態(tài)inncluude與與動(dòng)態(tài)iinclludee第一部分分: JJavaa 基礎(chǔ)礎(chǔ)知識(shí)1.Whatt wiill happpenn whhen youu atttemmpt to commpille aand runn thhe ffolllowiing codde? publlic claass Tesst staaticc innt xx = 5; staaticc innt xx, yy; pubblicc sttatiic vvoidd maain(Strringg arrgs) x; myyMetthodd(); Syysteem.oout.priintlln(xx +
11、 y + +x); pubblicc sttatiic vvoidd myyMetthodd() y = xx+ + +x; A. ccomppileetimme eerroor B. pprinnts: 1 C. pprinnts: 2 D. pprinnts: 3 E. pprinnts: 7 F. pprinnts: 8 2.Whicch oof tthe folllowwingg coolleectiion claassees ffromm jaava.utiil ppackkagee arre TThreead saffe? (Chooosee twwo)A. VVecttor B.
12、 AArraayLiistC. HHashhMapp D. HHashhtabble 3Whicch oof thee foolloowinng ttypees iss prrimiitivve jjavaa tyype?(Chooosee twwo)A SttrinngB inntC chharD Shhortt4Whicch ttwo demmonsstraate a hass a reelattionnshiip? (Chhoosse ttwo) A. puubliic iinteerfaace Perrsonn ppubllic claass Empployyee exttendds
13、PPersson B. pubblicc innterrfacce SShappe pubblicc innterrfacce RRecttanddle exttendds SShappe C. pubblicc innterrfacce CColoorabble puubliic cclasss SShappe iimpllemeentss Coolorrablle D. pubblicc cllasss Sppeciies pubblicc cllasss Annimaalpprivvatee Sppeciies speeciees; E. innterrfacce CCompponeen
14、t claass Conntaiinerr immpleemennts Commponnentt pprivvatee Coompoonennt chhilddrenn; 5. WWhatt iss thhe rresuult wheen yyou commpille aand runn thhe ffolllowiing codde? publlic claass ThrrowssDemmo staaticc vooid thrrowMMethhod() Syysteem.oout.priintlln(Inssidee thhrowwMetthodd.); thrrow neww Illle
15、ggalAAcceessEExceeptiion(deemo); pubblicc sttatiic vvoidd maain(Strringg arrgs) ttry thrrowMMethhod(); caatchh (IIlleegallAcccesssExccepttionn e) Sysstemm.ouut.pprinntlnn(CCaugght + e); A. ccomppilee errrorr B. rrunttimee errrorr C. ccomppilee suucceessffullly, notthinng iis pprinntedd. D. iinsiide
16、thrrowMMethhod folllowwed by cauughtt: jjavaa.laang.IlllegaalAcccesssExxcepptioon: demmo 6. Whicch ttwo staatemmentts aare truue ffor thee cllasss jaava.utiil.TTreeeSett? (Chooosee twwo) A. Thee ellemeentss inn thhe ccolllecttionn arre oordeeredd. BB. TThe colllecctioon iis gguarrantteedd too bee im
17、mmuttablle. C. Thee ellemeentss inn thhe ccolllecttionn arre gguarrantteedd too bee unniquue. D. Thee ellemeentss inn thhe ccolllecttionn arre aacceesseed uusinng aa unniquue kkey. E. Thhe eelemmentts iin tthe colllecctioon aare guaarannteeed tto bbe ssyncchroonizzed 點(diǎn)評:TTreeeSett類實(shí)現(xiàn)現(xiàn)了Seet接口口。Seet的特
18、特點(diǎn)是其其中的元元素惟一一,選項(xiàng)項(xiàng)C正確確。由于于采用了了樹形存存儲(chǔ)方式式,將元元素有序序地組織織起來,所所以選項(xiàng)項(xiàng)A也正正確。7. WWhatt wiill be priinteed wwhenn yoou eexeccutee thhe ffolllowiing codde? classs XX Y b = nnew Y(); X() Systtem.outt.prrintt(XX); classs YY Y() Systtem.outt.prrintt(YY); publlic claass Z eexteendss X Y y = nnew Y(); Z() Systtem.outt.
19、prrintt(ZZ); publlic staaticc vooid maiin(SStriing aargss) new Z(); A. ZZ B. YYZ C. XXYZ D. YYXYZZ 8.whhichh twwo ddecllareetioons preevennt tthe oveerriidinng oof aa meethood? A. ffinaal vvoidd meethooda() B. vvoidd fiinall meethooda() C. sstattic voiid mmethhodaa() D. sstattic finnal voiid mmethho
20、daa() E. ffinaal aabsttracct vvoidd meethooda() 9. YYou wannt aa cllasss too haave acccesss too meembeers of anootheer cclasss iin tthe samme ppackkagee whhichh iss thhe mmostt reestrricttivee acccesss mmodiifieer tthatt wiill acccompplissh tthiss obbjecctivve? A. ppubllic B. pprivvatee C. pprottect
21、ted D. ttrannsieent E. NNo aaccesss moodiffierr iss reequiiredd 10.wwhicch ttwo intterffacees pprovvidee thhe ccapaabillityy too sttoree obbjeccts usiing a kkey-vallue paiir? A. jjavaa.uttil.Mapp B. jjavaa.uttil.Sett C. jjavaa.uttil.Lisst D. jjavaa.uttil.SorrteddSett E. jjavaa.uttil.SorrteddMapp F.
22、jjavaa.uttil.Colllecctioon 11.1) cclasss SSupeer 2) ppubllic flooat gettNumm()retturnn 3.0f; 3) 4) 5) ppubllic claass Subb exxtennds Supper 6) 7) whicch mmethhod, pllaceed aat llinee 6, wiill cauuse a ccomppileer eerroor? A. ppubllic flooat gettNumm()retturnn 4.0f; B. ppubllic voiid ggetNNum() C. pp
23、ubllic voiid ggetNNum(douublee d) D. ppubllic douublee geetNuum(ffloaat dd)rretuurn 4.00d; 注意這道道題主要要考的是是方法的的oveerlooad和和oveerriide。對于ooverrloaad,只只有參數(shù)數(shù)列表不不同,才才做為標(biāo)標(biāo)準(zhǔn),而而返回值值和訪問問控制關(guān)關(guān)鍵字不不能做為為標(biāo)準(zhǔn),所所以B錯(cuò)錯(cuò)在方法法名相同同,但只只有返回回值不同同,這是是錯(cuò)的。C和DD是正確確的ovverlloadd。對于于oveerriide,則則訪問控控制關(guān)鍵鍵字只能能更加公公有化,異異常只能能是超類類方法拋拋出的異異常的子
24、子類,也也可以不不拋出。返回類類型,參參數(shù)列表表必須精精確匹配配。所以以A是正正確的ooverrridde。12.whicch ggetss thhe nnamee off thhe ppareent dirrecttoryy off fiile fiile.txtt? A. SStriing namme=FFilee.geetPaarenntNaame(fiile.txtt); B. SStriing namme=(neww Fiile(fiile.txtt).geetPaarennt(); C.Sttrinngnaame=(neew FFilee(ffilee.txxt).ggetPPar
25、eentNNamee(); D.Sttrinngnaame=(neew FFilee(ffilee.txxt).ggetPPareentFFilee(); E.Diirettoryydirr=(nnew Filee(ffilee.txxt).ggetPPareentDDir(); Striing namme=ddir.gettNamme(); 13Whatt haappeens wheen yyou tryy too coompiile andd ruun tthe folllowwingg apppliicattionn? CChooose alll coorreect opttionns.
26、 1. pubblicc cllasss Z 22. ppubllic staaticc vooid maiin(SStriing aargss) 3. neew ZZ(); 4. 5. 6. Z() 7. Z aaliaas1 = tthiss; 88. ZZ alliass2 = thhis; 9. syynchhronnizeed(aaliaas1) 10. trry 111. aaliaas2.waiit(); 112. Sysstemm.ouut.pprinntlnn(“DDONEE WAAITIING”); 113. 114. cattch (InnterrruppteddExcc
27、epttionn e) 15. Syysteem.oout.priintlln(“IINTEERR UPTTED”); 116. 117. cattch (Exxcepptioon ee) 188. SSysttem.outt.prrinttln(“OTTHERR EXXCEPPTIOON”); 119. 220. finnallly 211. SSysttem.outt.prrinttln (“FFINAALLYY”); 222. 233. 244. SSysttem.outt.prrinttln(“ALLL DDONEE”); 255. 266. A. Thhe aappllicaatio
28、on ccomppilees bbut doeesnt pprinnt aanytthinng. B. Thee apppliicattionn coompiiless annd pprinnt “DDONEE WAAITIING” C. Thee apppliicattionn coompiiless annd pprinnt “FFINAALLYY” DD. TThe apppliccatiion commpilles andd prrintt “AALL DONNE” E. Thee apppliicattionn coompiiless annd pprinnt “IINTEERRUU
29、PTEED” 點(diǎn)評:在在Javva中,每每一個(gè)對對象都有有鎖。任任何時(shí)候候,該鎖鎖都至多多由一個(gè)個(gè)線程控控制。由由于alliass1與aaliaas2指指向同一一對象ZZ,在執(zhí)執(zhí)行第111行前前,線程程擁有對對象Z的的鎖。在在執(zhí)行完完第111行以后后,該線線程釋放放了對象象Z的鎖鎖,進(jìn)入入等待池池。但此此后沒有有線程調(diào)調(diào)用對象象Z的nnotiify()和nnotiifyAAll()方法法,所以以該進(jìn)程程一直處處于等待待狀態(tài),沒沒有輸出出。14. Whaat rresuultss frrom atttempptinng tto ccomppilee annd rrun thee foolloowinng ccodee? ppubllic claass Terrnarry pubblicc sttatiic vvoidd maain(Strringg arrgs) innt aa = 5; Sysstemm.ouut.pprinntlnn(VValuue iis - + (a 55) ? 9.9 : 9); A. priint:Vallue is -9 B. priint:Vallue is -5 C. Commpillatiion errror D. Nonne oof tthesse第二部分分:
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2026山東事業(yè)單位統(tǒng)考濱州市惠民縣招聘43人備考考試試題及答案解析
- 2026江蘇大學(xué)附屬醫(yī)院招聘編外人員56人(一)筆試模擬試題及答案解析
- 2026渭南合陽縣農(nóng)村合作經(jīng)濟(jì)工作站招聘(2人)備考考試試題及答案解析
- 月老牽線活動(dòng)策劃方案(3篇)
- 挖溝拆除施工方案(3篇)
- 親子義賣活動(dòng)方案策劃(3篇)
- 肯德基衛(wèi)生管理制度表模板(3篇)
- 2026匯才(福建泉州市)企業(yè)管理有限公司派駐晉江市永和鎮(zhèn)招聘5人備考考試試題及答案解析
- 2026山東事業(yè)單位統(tǒng)考威海火炬高技術(shù)產(chǎn)業(yè)開發(fā)區(qū)鎮(zhèn)(街道)招聘初級綜合類崗位9人筆試模擬試題及答案解析
- 2026年河北張家口赤城縣農(nóng)業(yè)農(nóng)村局公開招聘特聘農(nóng)技員4名考試備考題庫及答案解析
- 頸椎病頸椎病的常見癥狀及治療方法
- 單證專員述職報(bào)告
- 眼底病OCT解讀演示教學(xué)課件
- 民間個(gè)人借款擔(dān)保書
- LY/T 1598-2011石膏刨花板
- GB/T 31588.1-2015色漆和清漆耐循環(huán)腐蝕環(huán)境的測定第1部分:濕(鹽霧)/干燥/濕氣
- GB/T 21268-2014非公路用旅游觀光車通用技術(shù)條件
- GA/T 1495-2018道路交通安全設(shè)施基礎(chǔ)信息采集規(guī)范
- 夜間綜合施工專項(xiàng)專題方案公路
- ★神東煤炭集團(tuán)xx煤礦礦井災(zāi)害預(yù)防與處理計(jì)劃
- Q∕GDW 11421-2020 電能表外置斷路器技術(shù)規(guī)范
評論
0/150
提交評論