Java软件开发工程师面试题

Java软件开发工程师面试题

ID:83338191

大小:15.40 MB

页数:136页

时间:2023-07-17

上传者:灯火阑珊2019
Java软件开发工程师面试题_第1页
Java软件开发工程师面试题_第2页
Java软件开发工程师面试题_第3页
Java软件开发工程师面试题_第4页
Java软件开发工程师面试题_第5页
Java软件开发工程师面试题_第6页
Java软件开发工程师面试题_第7页
Java软件开发工程师面试题_第8页
Java软件开发工程师面试题_第9页
Java软件开发工程师面试题_第10页
资源描述:

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

ᝅ☢⚪⌕Ḅᨵjava▭ᙠ!"#javaḄ$%ᙠ&'()ᙢ+,&-☢஺ᵫ0ᝅ☢⚪12Ḅ456575ᩖᜧ:;<=>ᜩ@ᜩABC-DCᝅ☢EᐺᓽHIJDKLᨵᐵḄᢈO*QRST◤⌕>VᨴḄ'XY=Zᓄ-\]ᝅ☢Eᐺᡠ_ᜧ:`abcᜓefᑮᝅ☢EᐺhijA⌕kᢝᙠmᜩn᨟hpDqᐸst⍝⚪>iwᨴxyᑮz{☢'>ᑗ}~ᑮᡂ☢'AᯠᑓᨵpL஺⚪'ᐜQᨵQᵨ-⌕Qᑖᨬ⌕Ḅ,ᫀḄᑖᑖᩩᳮᨎ}¢£⌕e⊤☢Ḅ¥¦T<_Bz>V§Ḅq¨ஹª«¬ஹᩩᳮy஺⌕®I¯zᫀḄ°±K²ᡈὅµI¶·ᫀḄ°¸}ᑏºᩭ஺¼⚪¸Ḽ¾¿À஺⚪AÁ§®⍝ᳮஹ᤮«஺⚪;Ã▲0QÅ-ÆÅA⌕ÇḄDÈzᩭÉÊ˧:⚪ÌᩭAÍÎ@<IAÏÐÑ-ÒÓL;ᦢÕL஺I⌕ᜧÐᙢᢣz×Ø⚪5ÍÙ-IḄÚÛ;⌕¼☢ܸ,ᨵÝÞᐸß-IAà;ÝḄI¸¸᝞âß¼Iãä{LIå_æAç«L<;à;ÝḄᔩéᐵ0Aêë~᝞âI`ìí;=⌕Þî)ïᜧðḄᦑ«ᨵᦻó¸fÞîA{sᐵ᩟õQ⊡QᔳÉSᦪ§ùẠû5)ᙠ᪥ýXûþ¯K>⚗ᯠ⌕ᑮḄḄ஺1.JavaẠᑖẠᑖḄᐵḄ•ᑁḄᐵḄ!"Ḅ#$Ḅ•%ᔠḄi஺Ḅ'()*☢Ḅ஺1'./".java"0ᦻ23ᔲᒹ67/89ᑁ:;ᨵ=>▲ᑴ;ᨵ7/ABCᨵ./publicḄDEpublicḄFGHIᦻ2F.J஺2ஹJavaᨵLᨵgoto?java3ḄMᶇOPᙠLᨵᙠjava3Rᵨ஺3ஹTTUV&&ḄXY஺&Z&[Hᵨ\]^IḄ_`a⊤c]^I8and:d_`aefḄ⊤ghḄijkltruem᦮/_`ijoltrueᔲᑣB⌕ᨵ.*lfalseᑣijlfalse஺&&qᐹᨵstḄuCᓽ᝞jx./⊤ghlfalseᑣ9yz`x{/⊤gh|᝞}ifstr!=null&&!str.equals"“::⊤ghdstrlnullm☢Ḅ⊤gh9᡻ᡠ9P

1NullPointerException᝞jl&ᑣNullPointerException!"஺lf(x==33&++y>0)ylf(x==33&&++y>0)9&qᵨ\_`ad&\aefḄ⊤gh9booleanm8⊤cᢥI\ᡃ"RᵨOxOfᩭI./᦮ᦪ&_`ᩭ᦮ᦪḄᨬ4/bit|᝞0x31&OxOfḄijl0x01஺ᜓ⍝⚪ᐜTeὅḄᐳ¡¢yT&&Z£¤ᱯ¦§ᜐDᑡª.«¬ᐺḄ|®ᩭ⊤¯°±ᳮ³´µ¶ᐭஹ¸▭¬º»¼஺4ஹᙠJAVA3᝞½¾d¿Ḅ7ÀÁᝅÃU;ᙠJava3⌕ľ7ÀÃUᙠ᜜☢ḄÃUÆ¿ÇÈ./᪗ÊᯠᙠËÌÃUÍḄÎṹ3RᵨÐᨵ᪗ÊḄbreakÆᓽ¾᜜ÌÃU஺|᝞ok:for(intÑ0;iv10;i++){for(intj=0;j<10;j++){System.out.println("i="+i+“”+j);if(j==5)breakok;))Ó᜜ᡃ/Ô"D9Rᵨ᪗ÊÕ*hÖ×᜜ÌḄÃUᩩ2⊤ghḄijÙᑮËÌÃUÍÎṹḄÚᑴ|᝞⌕ᙠ{ÛᦪÜ3ÝÞᑮß/ᦪO஺intarr[][]={{1,2,3},{4,5,6,7},{9});booleanfound=false;for(inti=O;iCᔲ\ᵨᙠlongàCᔲ\ᵨᙠStringà;ᙠSWzch(expri)3expriBC./᦮ᦪ⊤ghᡈὅãª"ä(æᜧOÍ)᦮ᦪ⊤ghintᡈIntegerᒹéᵫ}byte.short,chark◚ìíᣚlintᡠ«ï«ḄᒹéðḄ஺ñᯠlongZStringk9aᔠswitchḄòÇDE9Có◚híᣚᡂintᡠõ9C\ᵨ}swtichÆ3஺

26ஹshorts1=1;s1=s1+1;ᨵ=>┯?shorts1=1;s1+=1;ᨵ=>┯;}shortsl=1;s1=s1+1;ᵫ}s1+1_`m°øùᓣ⊤ghḄᡠijintyûüýshortS1mþÿᘤ◤⌕ᑴᣚḄ┯஺shorts1=1;s1+=1;ᵫ+=javaḄjavaᘤ!"#ᱯ%ᜐᳮ()*+,-஺7ஹchar/0123245671ᦻ9:<=>?(=67ᦪnV{I+G2ḄnT?67ᦪ+8⌕ᐸ3ᓽ*cpuᢝḄᦔ᳛ᨬᡠ+2+8Ḅᨬᦔ᳛Ḅ2«3o9ஹ676Ḅᘤ✌ᐜ⌕Z¢U⍝⚪jḄὃ¥¦>?6ᜧ¨✌ᐜ⌕©ªᳮḄ«¬⁚⌕®¯ஹ⌕}⍝°±Ḅªᳮr}⍝©1Ḅ²³´µ¶Ḅ·¸¹⌕ᐹᜓ6Ḅ☢ᔣ¼Ḅ½¾஺✌ᐜ©1ᵨ¿ᦪ0Ḅ7:⁚ᩭ4BḄᦪÀᡠ+©12Á⊤ÂḄᦪÀᨵ6ḄÄḄ=GÅÆurᳮuᡃÈᐜ+byteḄ᦮ᦪ=Ê!ᵨ17:⁚"#4B⊤ÂḄᨬᜧᦪÀÄ=-128ᑮ+127஺-1ᙠᑁ41ÍḄ¹"ᑴᦪÎ=11111111᝞N]7-1{°3ὃ⇋JavaÐḄÑᓣbÓ´"¹"ᑴÔN=1,11111110ᵫ"bÕLGbyteḄ4BÖ×ᡠ+"dᑖRØÙᓽᨬÚḄÔN=11111110_V-2U,ÛᑭᵨÝḄÞßmGàᦪḄ஺-128ᙠᑁ41ÍḄ¹"ᑴᦪÎ=10000000᝞N]7-128{°3ὃ⇋JavaÐḄÑᓣbÓ´"¹"ᑴÔN=1,00000000ᵫ"bÕLGbyteḄ4BÖ×ᡠ+"dᑖRØÙᓽᨬÚḄÔN=00000000_V0U᪵ḄÔNâᯠ3ᡃÈãäḄUYZ©1Ḅ²³´µ¶·¸Ḅ]7ᦪÀḄÔN32ÕL©1ḄåḄᦪÀÄ஺ᵫJava1æç⊤èÞÐḄnéÑᓣᡃÈᵨbyteᩭ~êÂUët⚪rm¼Ḅßìᜧ¨*+ᵨí☢67îᵨ᦮ᦪ~ßìḄÊïðñòì6í[inta=lnteger.MAX_VALUE;intb=lnteger.MAX_VALUE;intsum=a+b;

3System.out.println(**a="+a+”,b="+b+”,sum="+sum);ᐜ3ὃ⇋longᵫintḄ,ᦪÄ=2Ḅ31⊤ÂḄᨬᜧᦪÀó2*1000*1000*1000_V20Ḅᜧôᡠ+⌕ßm676ḄᘤᡃÈõno67*+ᵨ⊤ÂöᜧḄ᦮ᦪ÷øÑùGúû᜜67᦮ᦪ"#°±◀Ḅþ2ᜧᭆ᝞()ᑁᨵᡂᕒ⊤ᵨ⁚ᦪ⊤ᦪḄ!ᑴᦪ()ᨵ᪀⌼%&'ᒹ)ᨵ*+ᦪḄ,-ᣚᑮᑁḄ0⁚ᦪ1()23456◀ḄpublicclassBiglnteger{intsign;byteQval;publicBiginteger(Stringval)(sign=;val=;}publicBigintegeradd(Biglntegerother){}publicBigintegersubtract(BigIntegerother){)publicBigintegermultiply(Biglntegerother){)publicBigintegerdivide(Biglntegerother){))ᜓ:⌕<ᑏ>Ḅ?᦮AṹCDEFᩖḄ᝞HᨵᐶJḄKLMNOjdk1QRḄjava.math.BiglntegerḄSṹ஺☢VḄWXY⍝[\]Lᙠ_`aᑁᑏ>Ḅ?᦮AṹḄb⌕ḄCcCᔲᨵ%☢Ḅᭆf0ghbᨬj⌕ḄkCὃmcḄnᡠMc]⌕pqQrs&ᑏ>?᦮ḄᨬtuHvwxy⍝⚪c⌕{ḄvCc|}Wᑏ~*c|}Wcᨵ%☢ḄᩭC1Ḅ¡ᯠv£c஺᜜yᫀ1Ḅ᪾§AṹX¨j⌕©ª☢ᔣ¬®¯Ḅ°ᱯ}Cᐸ1Ḅ%&³´¨µ¶ᵨḄ·ᦻᓫº¨»¼XCnஹ¾¿ஹµ¶ឋஹ·ÁÂÃÄ*%☢Ḅ©ªÅWᶇ¨ÇḄᓺᙠÉÊn0ᐸb%☢ᩩÌÍ]*ḄÎÏ·ÁÇ◀LMcÐ~Ñ*᜜ÒÂLM>ᓟᐗ஺

410ஹᵨfinalᐵÖ×⛲`CÙᵨ]kCÙᵨḄ¬]ÚᵨfinalᐵÖ×⛲`CᢣÙᵨ]■ÙᵨᡠᢣᔣḄ¬1ḄᑁÝkCLMᦋḄ஺ß᝞¬᝞ÁàfinalStringBuffera=newStringBuffer(wimmutable");᡻â᝞ÁàãäåÉæç┯éa=newStringBuffer(m,);êC᡻â᝞ÁàᑣLMìíÉæa.append("broken!");ᨵWᙠîï%&ḄNᦪ`L<ðᵨ᝞ñòᩭóô%&ᑁ×ᦋõ!ᩭḄNᦪ¬publicvoidmethod(finalStringBufferparam){)ö▭øCù]ᑮḄ•ᙠû%&ᑁüᯠLMý4᝞Aṹᩭ×ᦋNᦪ¬param.append("aM);11ஹ"=="equalsᨵ(ᓫᯠ᪵Ḅ"ᯠ#$ᩭ&'ᙠ)ᑣ+,)==./012ᵨᩭ45678Ḅ9:ᔲ<=>#:ᵨ?4578ᡠABḄᑁDEᡠDFḄᦪ9:ᔲᓰᵨᙽᑁDc᝞Objetobj=newObject();78obj:ᑁD,newObject():ᑁDe[78objᡠABḄᑁDEDFḄᦪ9#:AYᓰᵨḄZᙽᑁDḄ✌ᙢᙬ஺A?ᢣᔣAYLMḄ78᝞V⌕45678:ᔲᢣᔣHAYᓽ⌕j678ᡠABḄᑁDEḄᦪ9:ᔲ<=[᎛#◤⌕ᵨ==./0lm45஺equals:ᵨ?456nAYḄᑁo:ᔲ

5returnthis==o;)¹᝞VL²ᨵ"³´µequalsº»Ḅequals(¡ObjectL¶·Ḅ)#:ᵨ=¼/0>:ᙠ45678ᢣᔣḄAY:ᔲ:HAY[᎛ᵨequalsᵨ=½¾ᑮH᪵ḄÀV᝞V45Ḅ:6nḄAYᑣÁfalse஺᝞VÂÃᑏḄLÅÆRÇ45ÈL}~Ḅ6cAYḄᑁo:ᔲæÒL78Q⌕ÚÛ×ç&LḄ⁚ṹᵨ}~éêcAY*☟᝱78#½áᑖâãä☘í᝱78#Ñáᵨ&஺Áîc78ÉÊ}~AYàÑïðAYᩭᵨ☟᝱78ᑣÑñòᵨLóᩭPᵨ஺c᝞A?t☢ḄÚÛôõ}~öcAY÷ø±Qᑖâ&staticVar78ùúû}~cAYstaticVar#½×1yü:û}~cAY#½ᑖâinstanceVarᓽÑýᑖâinstanceVar»ùúûinstanceVarḄ9±Q"×&1ÿ஺publicclassVariantTest{publicstaticintstaticVar=0;publicintinstanceVar=0;publicVariantTest(){staticVar++;instanceVar++;System.out.println(**staticVar="+staticVar+”,instanceVar=+instanceVar);})ᜓ◀ὅḄ᜜ᨬᵨᐹḄᵨᩭὅḄ!"#$ᨵ&'Ḅ(⚪*+,ᫀḄ./012ᣩ45678ᕒᨵᑏ;./<13ஹ>ᔲ@ABstaticDEᑁGHIJKstaticDEḄLᵨMN@A஺OPKstaticDE>⌕RJSᐵὶᙠWḄXYZ[JS\@Aᙠ]JS^_`DELᵨastaticDELᵨbN◤⌕Z[JS@AdeLᵨ஺fg>hstaticDEiLᵨb@.jᨵZ[klmJS᝞oBstaticDEpHIJKstaticDEḄLᵨqKstaticDE>ᐵὶᑮsJS^ḄᕖMuvwEᡂyᡠAstaticDEᑁGHIJKstaticDEḄLᵨ

614IntegerRintḄint>java{|Ḅ8}~ᦪJavaP~{|Integer>javaPint{|Ḅ஺intḄP0aIntegerḄPnullᓽInteger@AᑖI*P0ḄintᑣwE⊤IḄ᝞⌕⊤Ijᨵὃ*ὃᡂP0Ḅᑣ.ᵨInteger஺ᙠJSPHp»IntegerḄPnullᡠAᵨel⊤ᙠᦻ¡᪾p£¤bP¥¦§¨©aintḄP0ᡠAᵨel⊤ᙠᦻ¡᪾p£¤bªoP0ᡠAintN〉ᔠ;PwebḄ⊤ᓫᦪḄ஺ᙠHibernatep᝞o¯OID°±PIntegerq²Hibernateg@A᪷ᐸ>ᔲPnullaᑨ¶JS>ᔲ>·bḄ᝞o¯OID°±Pint◤⌕ᙠhbm᧜¹ᦻºp+»ᐸunsaved-value¼ឋP0஺¾᜜'Integer{|ÀR᦮ᦪÂᐵḄÃ;DE᝞¯§¨©Äᣚᡂ᦮ᦪIntegerp°±⊤¤᦮ᦪḄᨬᜧ*ᨬÇḄÈÉ஺15Math.round(11.5)ÊËÀÌMMath.round(-11.5)ÊËÀÌMMathp{|ÍRÎ᦮ᨵᐵḄDEceilஹfloorஹroundÏDEḄ;ᵨRÐÑḄÒᦻÓÔḄÕ±ÂJ᝞ceilḄÒᦻÖ±>ᜩØÙ]DEg⊤¤ᔣ^Î᦮Math.ceil(11.3)ḄªoP12,Math.ceil(-11.3)Ḅªo>-11ÛfloorḄÒᦻÖ±>ᙢÙ]DEg⊤¤ᔣÝÎ᦮Math.ceil(11.6)ḄªoP11,Math.ceil(-11.6)Ḅªo>-12ÛᨬÞßàḄ>roundDEÐ⊤¤“âãäå”çEPMath.floor(x+0.5)ᓽ¯~ᩭḄᦪ§^0.5èᔣÝÎ᦮ᡠAMath.round(11.5)ḄªoP12Math.round(-11.5)ḄªoP-11஺16ஹÝ☢Ḅêṹᨵì²Níᜐ?1.if(username.equals(“zxx"){}2.intx=1;returnx==1?true:false;17ஹðI;ᵨñpublicprivateprotectedAòNᑏbḄâ;ᵨñḄ@óõ᝞Ý⊤ᡠ¤஺᝞oᙠö⛲Ḅᐗù^☢jᨵᑏklú(ö⛲¨ᑣ⊤¤friendly஺;ᵨñhûüpackageýᐸþpackagepublic/JIprotected/-/x

7friendly/xxprivate/xxxᜓ⌕ÿᨵ4ᩗ▲4ᯠᐰ⌱ᙠᚖᔣᑖᢥ᣸ᑮᜧᡈᜧᑮḄ%&᣸ᑡ()*᧕,-☢Ḅ/஺18OverloadOverrideḄ1஺OverloadedḄ23ᔲ56ᦋ89:;Ḅ<=>Overload3?@ḄABOverride3⌚DḄABE(3?ᑏ஺?@Overload⊤HIJQ⚪)஺᝞OverloadedḄ2ḄSᦪᑡ⊤VJ᪵Ḅ9:ὅ<=lᯠE56VJ᪵஺PᡃḄ⚪3᝞¡2ḄSᦪᑡ⊤^ᐰ•᪵3ᔲ56£Ḅ9:;VIᩭcu?@Overload■Q3V¥Ḅᡃ56ᵨ¦§2ᩭ¨©Q⚪ᡃᨵi᎛gᵨJ2iE56Vjk9:«8¬ᓽV⌕ᐵ®ᐸ9:«d᝞ᡃgᵨmap.remove(key)2i°ᯠremove2ᨵ9:;P3ᡃ_}±V²jk³ᦈ9:«Ḅ8¬Qi᎛Ꮇ¶·

84ஹemÕÖᩭ¨᝞]J2ᙠ᱄ûf<3ᔲ5ÕÖᐹý<(concreteclass)?ûf

9Þᑣ_MÎEàᱥVâḄPQ´ᐵḄPQÒᙠÎEa_PQäâḄᦪæÒᙠÎEaOL᝞ç⌕ᙠèéÖêᙊEᐳíîïMç'èéஹᙊêᙊḄPQ⌕ᑖÜðqMᕖ6ᵫòêᙊ◤⌕ôᵨᑮᙊõö÷øõö÷ùᯠᙊḄÈឋ᝞äúᙠa=ËᡂÕᨵḄᡂᕒºÊ92êᙊḄPQûüᑖÜðᙊäjHÍᑮᙊõö÷ýÈឋçiþᵨᙊḄêᙊPQஹ⊤ᙊᙊᑖᙠ☢ᔣḄឋᓽ"ᡂ$%&'()*+Ḅ,-᝱(0ឋ)ᵫ'3Ḅ45()ᩭ78)ᦋ:஺$<=>ᳮ@ḄABCD"EFᑷHIᑷFḄJKᑖCDLᑖEFMᯠᑖEFO5CD'PQRᨵTUᜧḄWX"$EFYZᩭḄ[ᨵEF'3\R]ᡂ$JKEF◤⌕`ᵨᑁcḄdᔠᘤ)ᑷFᱏhiᘤjkK\R]ᡂᑷFJKCDᑷFḄlm[EFI$noEF⌕᡻4ᑷFqK஺rsrtu$vwᱥḄ*y)ᐳឋ{ᜐᯠ}"vwᱥ~5$[ὃ⇋vwᱥḄ*y)ᐳឋ{ᜐᶍ⚪)᪗ᐵḄTv☢"Wᙠ᪗ᨵᐵḄ☢஺A᝞ᑮ$[⇪⇩)ᜧRuḄ*{ᜐTr஺rᒹ45r)-᝱r¡☢஺A᝞¢£$Person»᝞ZsclassPerson{Stringname;intage;)¥ᩭ¦§ᩖḄwᱥᨵ¦i☢©O5ª«[◤⌕I@Ḅ¬)®¯ᡠ±☢¢£Ḅ[ᒹ²¬)®¯¡0ឋ$³r´µᵨrQ±¶·ὃ⇋$v᪗ᐵḄ¸⁚஺ᡃrḄᳮ@⌕ᵨM»¼½$wᱥḄᡠᨵ☢᪵¿ÀḄᑁÁÂiI⌕ᗐ>ᑜᑖÅ⚪ḄÆǪ«◤⌕ÈU[ὃ⇋ÈU஺ÉÊsᙠ¢£)ËÌ$ḄÍ᎛Q±ᙠ$ÏÐᙠḄḄÑẠ{ᩭÓ4ÔÏÐᙠḄᡠ¢£ḄᑁÁK5'3ḄᑁÁQ±Õᐭ×ØÙḄᑁÁᡈÛᦋÜᩭḄµ{<〉ᔠᱯßḄ◤⌕ÉÊ஺ÉÊB'Jᐳà᱄ᦪã)ḄDᑴ{åḄ$³ᐵªæ%IçjḄQèᵨឋ)Q᡽êឋ஺i᝱si᝱ᢣm좣Ḅíᵨ:îᡠᢣᔣḄᐹ,ð)nlíᵨ:îuḄ`ᵨᙠñmÍò¢ᙠmìó4ôå\ò¢ᓽ$íᵨ:î᎔öᢣᔣ÷ḄËAíᵨ:îuḄ`ᵨᑮö÷ËÌḄøùᙠᵫmìó4ôå\Rú¢஺O5ᙠmìó4Í\ò¢ᐹ,Ḅ᪵ᵨÛᦋûmìüṹQ±þíᵨ:îÿᑮᔜḄᵨᵨḄᐹᦋᓽᦋ!ṹ#$%ᦋ&'(ᡠ*Ḅᐹ!ṹ+$%⌱-./&'0᝱2#3.᝱ឋ஺.᝱ឋ6789:Ḅᮣ<ឋ=᡽?ឋ஺@᝞B☢!ṹDḄUserDao3E/FGHIᵨJuserDa஺ᢣᔣḄ@MNᵫdaofactory.getDao()ᙠ᡻'Ḅ(᎛STᨵ(᎛ᢣᔣḄ3UserJdbcDao2/ᨵ(᎛ᢣᔣḄ3UserHibernateDao2/2᪵ᵨᦋW!ṹ#$%ᦋuserDaoᢣᔣḄᐹuserDao.insertUser()ᵨḄᐹ!ṹXᦋᓽᨵ(᎛ᵨḄ3UserJdbcDaoḄinsertUser,ᨵ(᎛ᵨḄ3UserHibernateDaoḄ

10insertuserZUserDaouserDao=daofactory.getDao();userDao.insertllser(user);[\Z]ᔛ_`aᑮḄ3bcd3ecf23ஹjavaD.᝱Ḅhᑴ3jkf☠Ḅ3᱄ᡈFGIḄᵨJ$%ᢣᔣoᡈᐹḄ@MNᵨḄᙠ&'pqr᝱*#3ᵨJᡠᢣᔣḄᐹ@MNḄX#3ᑁtuvᙠ&'Ḅw/MNḄ3ᵨJḄxDIḄ஺24ஹabstractclass=interfaceᨵjkyzf{ᨵabstract⛲}Ḅclassᓽ~NabstractḄ@MN஺{ᨵabstractḄI~abstractclassabstractclassDḄ3NḄ஺abstractclassDINᙠᐹ(Concrete)oDᡠ%ᨵN᪀⌼ᡈN᝱஺᝞ḄoᨵN᱄DḄᡠᨵNwkoXI~abstractx஺FG(interface)$%ᡂ3NḄEᱯ@FGDḄᡠᨵ3NḄ஺FGDḄI~publicabstractxFGDḄᡂᕒJx~publicstaticfinalB☢[EBὅḄyzZ1.N$%ᨵ᪀⌼FGDᨵ᪀⌼஺2.ND$%ᨵᡂᕒJFGDᨵᡂᕒJ3.ND$%ᒹ{NḄFGDḄᡠᨵ3NḄᨵNḄ஺4.NDḄNḄx$%3publicprotected=(xᯠeclipseB┯¢£X')¢FGDḄN¤3publicxḄ¥¦ᓽ~publicabstractx஺5.ND$%ᒹ{☟᝱FGDᒹ{☟᝱6.N=FGD$%ᒹ{☟᝱ᡂᕒJNDḄ☟᝱ᡂᕒJḄx$%¨©¢FGDIḄJ¤3publicstaticfinalx¥¦ᓽ~publicstaticfinalx஺7.E/$%./FG¢¤ª«E/N஺B☢FḼὅᙠ£ᵨḄyzZFG®.Ḅ3ᙠ¯°±᪀²³´ᢵ¶ᵨ·⌕ᵨ¹Iºᙽ¼Ḅ½᜿¿஺Nᙠ!ṹ☢´ᢵ¶ᵨ$%!ṹḄÀᵨ@᝞ºÁ²³ºÂ3NḄE/ᐺx£ᵨᎷ²Å/⚗ÇḄᡠᨵServlet⌕ᵨÈḄÂÉ'ᩗ▲ᑨÍஹÎÏÐÑ=ᜐᳮÔÕwk#$%IE/NḄÖ+ᡠᨵḄServletª«2/NÖᙠNÖḄserviceD×ᡂᩗ▲ᑨÍஹÎÏÐÑ=ᜐᳮÔÕḄ!ṹᙠᔜ/oD¤3×ᡂᔜØḄÙÚÛÜ!ṹÝ!ṹ᝞BZpublicabstractclassBaseServletextendsHttpServlet{publicfinalvoidservice(HttpServletRequestrequest,HttpServletResponseresponse)throwsIOExcetion,ServletException{ÎÏÐÑÉ'ᩗ▲ᑨÍ

11if(ᐹᨵᩗ▲){try{doService(request,response);)catch(Excetpione){ÎÏÔÕ½ß))}protectedabstractvoiddoService(HttpServletRequestrequest,HttpServletResponseresponse)throwsIOExcetion,ServletException;஻â©ᩗ▲IᡂprotectedãäåæÙçèéê~H3æëìoᵨḄ)publicclassMyServletlextendsBaseServlet(protectedvoiddoService(HttpServletRequestrequest,HttpServletResponseresponse)throwsIOExcetion,ServletException(íServlet¤ᜐᳮḄᐹÙÚÛÜ!ṹ))᱄D¼ḄÅî!ṹïᶇìoñ#ᵨºÁ²³ºÂ஺ᜓâZ2⍝⚪Ḅõö3ᐜøùúN=FGḄÖíᭆüᯠý[ὅḄþ⁚ᨬὅḄᵨ஺ὅ⁚ḄᩩᳮᐜḄ᪀⌼ஹ"#ᡂᕒ&'((ᒹ+,-)☟᝱&'(12ឋ46☢⌲789:Ḽ<=ὅ12Ḅ>?Ḅ89ᱯᨬᵨAᐺCḄDEᩭGHIJKLḄᢈNOP஺25ஹabstractḄmethodᔲRSTstatic,ᔲRSTnativeᔲRSTsynchronized?abstractḄmethodURVstaticḄWX,-Ḅ⌕ZE[HḄ\static]E^U_ᐵabnative⊤de⌕ᵨf᜜hijklḄmno[HḄUpᙠḼZE[HḄr⚪ᡠVuvUw,-ḄUw]abstractxᵨ஺D᝞FileOutputSteam⌕z{ᡭ}⍝PḄ[HᵨḄaᐵḄapi[HD᝞ᙠwindowsᵨco[HḄᡠVjdkḄṹRVHFileOutputStreamḄopenḄ᝞privatenativevoidopen(Stringname)throwsFileNotFoundException;᝞ᡃ⌕ᵨjavaᵨᑏḄcoᦪᡃ:ᵨḄᡃ◤⌕ᢥ᯿javaḄ⌕ᑏcoḄᦪᡃḄcoᦪ7ᵨḄcoᦪ஺ᵫᡃḄcoᦪᢥjavaḄ⌕ᩭᑏḄᡃcoᦪRV]java:_java¡¢Ḅ:£¤]ᡃcᦪḄjavaḄU◤⌕ᑏᐹ¦Ḅṹ§◤⌕ᙠ¨☢©ªnative

12ᐵsynchronized]abstractᔠᵨḄr⚪ᡃ¬vU®WXᙠᡃ¯°Ḅ±²(³ᩭ´µᑮ·h¸¹º»ᡃ¬synchronizedeᵨᙠᐹ¦Ḅ_¼ᨵ¾஺\»_ḄsynchronizedS¿ᡠÀᵨḄS¿┝-this\,-_ÂthisÃÄ஺26ஹÃÄᑁÆÇStaticNestedClass(InnerClassḄUS஺ᑁÆᙠḄᑁÆḄᑁÆUw☟᝱ᡂᕒ(☟᝱ᡂᕒU-ḄᱯឋÈXAÉÊËÌᜐᡠV◤⌕Îᑮ\ÏÄÐÑÒÓÔ⌕ÕuÎᑮᑁÆḄ·ᑖA×bØÙᑁÆUXÚÓÛhÒ¸ÜUÚÓÛ஺ᡃÝRwÞᯠ☟᝱ᡂᕒàcoḄᐰâ&'\ᑁÆ#ãᵨäåᑁÆ-ᵨḄᡠVÕ“ᐰâ&'”ÎᙠᑁÆè¾ḄÒ¸Þᯠé¾ḄÒ¸eZἭë)ᑁÆRV:ìr᜜ÆḄᡂᕒ&'ᑁÆRVᙠ᜜ÆḄ᜜☢vRVᙠ᜜ÆḄ¦᝞ᡠdpublicclassOuter(intout_x=0;publicvoidmethod()(Innerlinnerl=newInner1();publicclassInner2//ᙠ¦ᑁÆḄᑁÆ(publicmethod()(out_x=3;}}Inner2inner2=newInner2();)publicclassInnerl//ᙠ¦᜜☢ḄᑁÆ())ᙠ¦᜜☢ḄᑁÆḄìrCRVpublic.protecte,íîḄprivate44hCïðḄᡂᕒ&'ᨵ4hìrC᪵uòᑁÆḄᐸôᔲRµõh¸¹ᡃvRVᙠ᜜☢äåᑁÆḄ[D-äåᑁÆḄ[D-T⌕ᐜäå᜜ÆḄ[D-ᯠᵨ᜜ÆḄ[D-7äåᑁÆḄ[D-ṹ᝞Outerouter=newOuter();Outer.lnnerlinnerl=outer.newInnner1();ᙠᑁÆḄᑁƨ☢UwᨵìrCö⛲øïðḄâÆ&'᪵§hᑁÆḄ¨☢RVÀᵨfinalᡈabstractö⛲ø஺hᑁÆᐸôURµḄᐸôúᵨhᑁÆ

13§hᑁÆäåḄ[D-RVû⌴ýᐸôìr஺hᑁÆþÿᐜᵨᓽᑁḄṹᙠᵨḄᐜᵨḄ⍝ᳮ!"᪵Ḅ஺%ᑁ&'()*Ḅ+,final.⛲0஺1234⁚6⌕ᙠeclipseᑏṹ99᪷;<=>ᐹ@AḄᔜ┯DEFG&'HIJKᑮ஺ᙠ*ᑁM&'Nᵨ᝞PQᩭST"%UVᑁᓽW"XYᡈḄ[Ḅ\]MSTJ[Ḅ^_1`a◤c[VdepublicclassOuter(publicvoidstart()(newThread(newRunable(){publicvoidrun(){};)).start();))ᨬᙠ᜜Ḅᑁ☢&',IstaticᐵjklmᡂcStaticNestedClassopqrᐹᨵᑁḄᱯឋᡠᨵlwIxpqᑁ஺StaticNestedClassyzᙠ{|]Ḅ|c}~Iᨵ6ᙠᵨ]ḄQIᨵ"3p&'ᡂpublicஹprotectedஹḄஹprivate%myz6ᡂpublic}Ḅ%஺ᙠ᜜☢ᵨStaticNestedClassḄVdc“᜜V.ᑁV”஺ᙠ᜜☢q◤⌕ST᜜Ḅ^_1`G&'XSTStaticNestedClass»_᝞»ᎷInnerᙠOuterḄStaticNestedClass&'ᵨ᝞PQSTInnereOuter.lnnerinner=newOuter.lnner();ᵫ2staticNestedClassq2᜜Ḅ^_1`ᡠ'staticNestedClass()᜜Ḅstaticᡂᕒ஺ᙠ᜜()StaticNestedClass]&'XᵨStaticNestedClassḄVkmq◤⌕,I᜜ḄVkJᙠStaticNestedClass!&'Xᵨ᜜ḄstaticḄᡂᕒq◤⌕,I᜜ḄVk஺ᙠ☟᝱Ḅᑁ!StaticNestedClass]᎛qᙠ☢,staticᐵjk⏥᝱ḄStaticNestedClassyzḄᑁḄ£ᵨ¤¥¦§p◀J&'X()᜜ḄstaticḄᡂᕒM&'()☟᝱Ḅ+,final.⛲0஺ᜓªe✌ᐜ᪷;¬Ḅᓺ`®¬1ᑁḄ¯*☢Ḅᱯ°e_᝞ᙠ±ᙢ&'&'()᜜Ḅᡂᕒq³᝱ᡂᕒᜧḄᱯ°஺ᯠr®"34⁚☢Ḅ¶·_᝞¸%¤ḄQ☟᝱ᑁ'¹UVᑁ஺27ஹᑁ&'ᵨpḄᒹ»Ḅᡂᕒᔩ½ᨵᨵ▲ᑴ½Àᐰ&'஺᝞Âq³᝱ᑁᨵ▲ᑴÃ

14᝞¬Ä☟᝱ÅᝅÇᑁḄ"%ᱯ_*ᙠ%ÉÊPq&'()᜜Ḅyzᡂᕒm6()᜜Ḅ☟᝱ᡂᕒ_᝞P☢ḄṹeclassOuter(staticintx;staticclassInner(voidtest()(syso(x);)))Ë⚪]!⌕ÍÎÏ⁐Ñ᥅@)ὅḄÔÕÖᯠ×ØÙÚ¬®Ḅ☟᝱ᑁq()᜜Ḅᡂᕒ+¬"IᩭG⚔ÜqÝ⌕ᐜÞḼ×Øà×Øáâᯠr®ᱯãÉÊà×Øᔛå஺28ஹAnonymousInnerClass(UVᑁ)ᔲ&'extends(éê)ᐸpᔲ&'implements(^)interface(XY)½&'éêᐸìᡈ^ᐸìXY஺qí&'mÃ29ஹsuper.getClass()îᵨP☢ïḄðñÂò½importjava.util.Date;publicclassTestextendsDate{publicstaticvoidmain(String[]args){newTest().test();}publicvoidtest(){System.out.println(super.getClass().getName());))¥᜻ôñÂTestõ2ᾯ÷ញùúḄ⚪ûᙠ"±qqüᨵ±ýþÿ⚪ᡃᨵẆ

15ᑮᜩ☢ᑮ஺ᙠtest!"#$%ᵨgetClass().getName()!'(Ḅ*Test+,ᵫ.getClass()ᙠObject+"/0ᡂfinal2+34⌚67!ᡠ9ᙠtest!"%ᵨgetClass().getName()!ᐸ;*ᙠ%ᵨ<᱄+>?ḄgetClass()!@ᦔ.%ᵨsuper.getClass().getName()!»ᡠ9>super.getClass().getName()!'(ḄDE7*Test஺᝞Gᑮ᱄+Ḅ,HE7ᵨ᝞IṹKgetClass().getSuperClass().getName();30ஹString*ᨬNOḄᦪQ+RᔩTNOᦪQ+RᒹVbyteஹintஹcharஹlongஹfloatஹdoubleஹbooleanWshort஺java.Iang.String+*final+RḄXY3Z9>?+ஹ34[ᦋ+஺]^_ᦔ᳛⁚ḕcdᡃeE7ᵨStringBuffer+31'Strings="Hello";s=s+"world!";fgIṹ᡻gijkḄStringlm"ḄᑁoᑮpqᨵTᨵ஺X]Stringrsᡂ3Zq(immutable)+ᡠ9tḄᡠᨵlmu*3Zqlm஺ᙠvIṹ"sjᐜᢣᔣStringlmᑁo*"Hello”ᯠiᡃels{g+}~sᡠᢣᔣḄlm*ᔲᦋqᕖTᫀ*ᨵ஺s3ᢣᔣjᩭlmᢣᔣStringlmᑁo]"Helloworld!">jᩭlmᙠ.ᑁ"*sᵨq3ᢣᔣt஺☢Ḅᡃeo᧕᝞Gl{gᔜ¡ᔜ᪵Ḅ[ᦋᡈὅ3Z⚜¦Ḅ[ᦋ§ᵨStringᩭI⊤Ḅ©ª«ᜧḄᑁ├஺X]Stringlm¯°i34ᦋqᡠ9l.±3²Ḅu◤⌕Stringlmᩭ⊤µ஺E7ὃ⇋§ᵨStringBuffer+tᐕ¹[ᦋ3*±3²Ḅu⌕ᡂºḄlm஺»¼f¡+Ḅlm½ᣚᓝᑖo᧕஺²ᡃeZ9Á⍝᝞G⌕§ᵨᑁoòḄ3ıÅunewString஺Æ᝞ᡃe⌕ᙠ᪀⌼ᘤ"l,ÊsḄStringᵨq{gËkᓄÍtrÎ]ËkÏEÐ᪵ÑKpublicclassDemo{privateStrings;publicDemo{s="InitialValue";)

16)Ós=newString("lnitialValue");iὅ±Åuª%ᵨ᪀⌼ᘤᡂºlmឋ4Õ¼ᑁ├ᜧ»¼ᨵÖ0X]Stringlm3Zᦋqᡠ9l.ᑁoòḄ⌕Stringlmᩭ⊤µZ9஺D×Å%ᵨ☢Ḅ᪀⌼ᘤد×lmÙeḄString+RÚឋsuᢣᔣ²lm஺☢ḄN.᪵Û;Kl.᝞GᑁoòJavaÜ]teI⊤²Stringlm஺ᵨᐵÞnew%ᵨ᪀⌼ᘤß*ªØ¯ºḄlmàᑁo*ᔲò஺á.]â⌕ÍString+rsᡂ3Zq+*tḄᵨ⌶ä/Ḅ஺ᐸ;3Stringå×Java᪗ç+è"Ḅ+u*3ZqḄ஺ᙠéêḄ᎛ᡃeᨵ᎛D◤⌕rs3Zq+ᩭì⌴îÃᐵḄÏD*☢ᔣlmïḄðñ஺3Zq+ᨵòóôõ᝞X]tḄlm*öḄᡠ9×÷ø»ùD3ªᨵúû⚪஺ÐᯠDᨵòüôõ᝞±3²Ḅý᝱u⌕lmᩭI⊤Z4ª⌼ᡂឋ4Ḅ⚪஺ᡠ9Java᪗ç+è^ÿ᱐,ᓽStringBuffer஺32ஹᔲStringStringfinalᦑ஺33ஹStrings=newString("xyz");StringObject?ὅᨵ!ᡈ#”xyz"%&%'#(%')ᙠ+,-./01#./"xyz"234567#8019Ḅ;஺NewString<ᑏ7>?Ḅ%'#@A;./"xyz”%'ḄᑁDᩭ3?String%'஺᝞GH>ᵨJ‘xyz'#(AL⊤>N“xyz”PQ#RST01U஺34'StringVStringBufferḄWUJAVAXYZ[!\StringVStringBuffer#@]^_V`a+,-#ᓽᒹc5+,Ḅ+,ᦪe஺(StringZ[ᦪfᦋḄ+,-஺h(StringBufferZ[Ḅ+,-ijkᦋ஺lmn⍝+,ᦪe⌕ᦋḄq᎛m>sᵨStringBuffer஺ᐺuᙢ#msᵨStringBuffersᩭw᝱᪀⌼+,ᦪe஺W᜜#String|4equals}~#

17newString(“abc”).equals(newString(“abc”)ḄGtrue,hStringBufferᨵ|4equals}~#ᡠ#newStringBuffer("abc").equals(newStringBuffer(“abc”)ḄGfalse஺SḼ⌕ᐹḄᩭ#ᡃ]⌕1ᑮ100Ḅᡠᨵᦪ+ᩭ#ᡂ-஺StringBuffersbf=newStringBuffer();for(inti=0;i<100;i++){sbf.append(i);)☢ḄLṹᦔ᳛#StringBuffer%'#h☢ḄLṹᦔ᳛#101%'஺Stringstr=newString();for(inti=0;i<100;i++)(str=str+i;)ᙠ!ὅq#&Ḅ¡ᦪ¢ᡂ10000ᯠ¤ᵨendTime-beginTimeᩭ¥¦!ὅ᡻jḄq¨©#ᨬ¤«⌕StringBuilder¬StringBufferḄ஺String⌚®equals}~VhashCode}~#hStringBufferᨵ⌚®equals}~VhashCode}~#ᡠ#¯StringBuffer%'_^iJava°ᔠ9qN34²⚪஺35ஹ᝞´µ⌹·ᑖᒘḄ+,-ºᣚᡂᦪ᝞G¼jdkapi#ᡃ½ᑏ3ᩭ¾ᡃᡃḄ¿À\1.ᵨÁᑣ⊤ÃÄ#Lṹᜧᭆ\String[]result=orgStr.split("J)Ç2.ᵨStingTokenizer,Lṹ\StringTokenizertokener=StringTokenizer(orgStr,",);String[]result=newString[tokener.countTokens()];Inti=0;while(tokener.hasNext(){result[i++]=toker.nextToken();}36ஹᦪᨵᨵlength()(}~Stringᨵᨵlength()(}~ᦪᨵlength()(}~#ᨵlengthḄÈឋ஺Stringᨵᨵlength()(}~஺

1837ஹ☢(ᩩËAᐳ56%'\Strings="a"+"b"+"c"+"d";Í\%Î᝞Lṹ\Strings1="a";Strings2=s1+"b";Strings3=,,aH+”b”ÇSystem.out.println(s2=="abM);System.out.println(s3=="ab");ÏᩩËAᡭᓺḄGfalse#ÏᩩËAᡭᓺḄGtrue#(javacÒÓ%+,-./RSÔÕḄ⊤ÃÄijÖᓄ#Ø⌕ÙᑮÚjÛÜijÕ~ÚÝᜐᳮ#hᙠÒÓqÜᣵᐸ9ḄÕ·#RS¯ᐸÒÓᡂ(â./ÔãḄG஺⚪ä9ḄÏjLṹåÒÓᘤᙠÒÓqÖᓄ¤#ÔlÎRSçè“abed”Ḅ+,-#ᡠ#☢ḄLṹ&éString%'஺ᑏ᝞!jLṹ#Strings="a"+"bH+"c"+êÇSystem.out.println(s=="abed")ÇᨬëᡭᓺḄG&étrue஺38ஹtry{}ìᨵreturnËA;íîᙠ(try¤Ḅfinally{}ìḄcodeNNå᡻j#q᎛å᡻j#ᙠreturnH«¤ïðmḄÍᫀᙠreturnH#òóôõᙢ#ᡃḄÍᫀᙠreturn9᡻j#ö÷☢øùLṹḄÚjG\publicclassTest{/**“@paramargsaddbyzxx,Dec9,2008*/publicstaticvoidmain(String[]args){//TODOAuto-generatedmethodstubSystem.out.println(newTest().test());;}staticinttest()intx=1;try

19returnx;finally(++x;})).....᡻jG.....1ÚjG1#ᕖÿᦪᵨᦪᑮḄᦪᜓᦪ⌕ᐜᙠᡝ!ᯠ#$%&'(ᑮᦪ஺ᡠ+,-ᦪ.ᡃ01234ᦪ5612ᔳ89:;<=-ᙠ.8>?@A!Ḅ஺39ஹC☢Ḅ&EṹGHḄ-IJKpublicclasssmallT(publicstaticvoidmain(Stringargs[])(smallTt=newsmallT();intb=t.get();System.out.println(b);}publicintget()(try(return1;)finally{return2;}}}Ḅ-2஺ᡃ

20return2;)}᡻2.............fundfunc22abfinallyWḄEṹreturncbreakZ[#᡻2

2140'final,finally,finalizeḄde஺finalᵨ\fghឋjkclᑖe⊤ohឋ0?@A

22ᡈὅ=CᣵE᝞ᦪHIJK(ArraylndexOutOfBoundsException)Mᢣ┐(NullPointerException)'RSᣚ(ClassCastException)U@AV᛻ḄXᓄᡈᡠ$%Ḅ⚪ᵨᡝḄ⚪E᝞[\]^_`Ma/*b6᪵Ḅd/efCᣵ஺javaghi/jḄklmᫀopᘤrᑴtutry..catchᜐᳮᡈᵨthrowsxy>?z{|}~ᵨm5ᜐᳮᡠ<'checked;<ᜐᳮ';

23newThread(newRunnable(){}).start();6⊤~ᵨThreadçÑëìḄRunnableçÑḄrunm5newRunnable(){}⊤©RunnableḄè¼ËRḄ¿EçÑ,runnableḄËRé|runm5dḄṹ᝞:newThread(newRunnable(){publicvoidrun(){))).start();íjava5)îᨵ᝞:©ª^ïðñ^ḄmòExecutorServicepool=Executors.newFixedThreadPool(3)for(inti=0;i<10;i++){pool.execute(newRunable(){publicvoidrun(){}});)Executors.newCachedThreadPool().execute(newRunable(){publicvoidrun(){}});Executors.newSingleThreadExecutor().execute(newRunable(){publicvoidrun(){}});ᨵå7¿Þm5ᑖ1ᵨnewThread()newThread(runnable)óòæ©7ôë~ᵨthreadḄrunm5ᡠ<ᡃÊõõ1ᵨThreadËRᓽnewSubThread()஺æê7~ᵨrunnableḄrunm5஺ᨵå7¿Þm5ᑖ>÷ThreadRø¿ÞRunnableëùᵨsynchronizedᐵ×Øß⛲jám5úç1ᵨstop()ûÉ/üᐰ஺Éýk◀ᵫḄᡠᨵ┝᝞ᜐ᝱ᐸᙠ᝱!"#$ᦋ&'஺)*+!",-.Ḅ/⚪ᡠᙠ஺suspend()123᧕567┝஺8ᵨsuspend()Ḅ:᎛<᪗>?ᩭAᓾCᯠᢝᨵᙠFGHIḄ┝஺J:ᐸKLMN/┝ḄOP◀RS"ᢞV"ḄឮXYZ஺KLᩭ[,᝞&']ឮX<᪗^:_`abᵨKLc┝ḄOPd>⌼ᡂ7┝஺ᡠghibᵨsuspend()hᙠjkḄThreadlmnᐭc᪗pᢣ,hirstuᢞV஺v᪗pᢣ,hiᢞVwᵨwait()xᐸyᐭz{᝱஺v᪗pᢣ,h|ឮXᑣᵨcnotify()~s஺47ஹsleep()#wait()ᨵ(Ḅᫀsleepul(Thread)Ḅ12Jᨚ?᡻Zᢣ:᡻Z>ᐸAu᝱ᯠᢝᑮ:>jsឮX஺8ᵨsleep>┝஺waituObjectlḄ12J8ᵨwait12┝yᐭz{JḄz{┝ᨵ┐J5,notify12(ᡈnotifyAII)¢

24yᐭ┝£ᜓI┝yᐭYZ᝱஺)sleepdu.ᙠ᡻ZḄ¥s¦,cpucpu§᡻ZᐸᙠsleepᢣḄ:¨cpu¢>©ᑮFcª«¬᡻Z᝞|Hyᐭ^®┝sleep12¯>┝ᓽb|Hbᵨsleep12¦,cpuAᐸS^®┝ᢱ²Ḅ³´2Iᑮ᡻Z஺waituᢣᙠcµ¶yᐭ^®┝Ḅᑁ¦jkᨚ:¦,^®┝gwᐸ.ᙠz{J┝Ḅ¸gIᑮ^®┝¯YZᨵᐸ8ᵨnotify12(notify¯┝u¹º8ᵨ¨wait12Ḅ¸g§»¼I┝Ḅ½¾Au¿Iᑮ┝ÀÁ┝tᙠÂÃÄÂtÅ஺᝞notify12☢ḄÇṹtᨵ*É◤⌕FÌÇṹ᡻ZÍ¢>┝¸gᙠnotfiy12ÎÏcz{#ÌÇṹÐÐᦔ)8ᵨwait12Ḅd>Ò◀wait᝱#Ó¸gÔÕIᑮ┝ª«ᔣYZ஺waitḄ×Ò⌕ØᔠÚÛÇṹᩭ[Ü¢ÝIjk-ÜÞ஺packagecom.huawei.interview;publicclassMultiThread{/***@paramargs7publicstaticvoidmain(String[]args){//TODOAuto-generatedmethodstubnewThread(newThread1()).start();try(Thread,sleep(10);}catch(InterruptedExceptione){//TODOAuto-generatedcatchblocke.printStackTrace();)newThread(newThread2()).start();privatestaticclassThread1implementsRunnable(©Overridepublicvoidrun(){//TODOAuto-generatedmethodstub//ᵫFÄḄThreadl#☢ḄThread2ᑁârun12⌕ᵨ^ãÁäᘤᡃ'FÄᵨthisÀÁᙠThread2Ä☢Ḅthis#FcThreadlḄthisu^c஺ᡃ'ᵨMultiThread.classFcç⁚ṹ|HéêÄëᵨFcìí:ᢣᔣḄMu^c஺synchronized(MultiThread.class){System.out.println("enterthreadl.

25System,out.println(Mthread2issleepingtenmillisecond...'1);try(Thread,sleep(10);}catch(InterruptedExceptione){//TODOAuto-generatedcatchblocke.printStackTrace();)

26synchronizedvoidgetX(){}}50ஹÉᨵðñò12^®ᨵðñò12Éᨵóñò12ᑖuªõThreadl¼ñòRunnableö÷^®Ḅñò1☢ᨵóᑖusynchronized,wait¼notifywait():bcᜐz{᝱¯ᡠᢝᨵḄḄlock஺sleep():bc.ᙠYZḄᜐṑḨ᝱uc☟᝱128ᵨJ12⌕ᣓᣍInterruptedExceptionýþ஺notify():ᖔ⏨ᜐ᝱ḄḄᙠᵨḄ᎛ᑗ

27Ḅᖔ⏨᝱ḄᵫJVM"ᖔ⏨#$ᢥ&ᐜ(஺Allnotity():ᖔ⏨ᡠᨵᜐ,᝱Ḅ-ᡠᨵᖔ⏨./Ḅ┝12345஺51ஹ78ᵨrun()9start()?.78ᵨstart():;<᝱=>?=@ABCD᝱EFᐵὶIᐹKḄ᡻DMṹrun()OᡠᐵὶḄ᡻DMṹ஺52ஹPQᐭ./Ḅsynchronized>ᐸ2ᔲ?Qᐭ./Ḅᐸ2UᑖWXYZ[1.ᐸ\]ᔲ^_synchronizedᐵ`a᝞cd^ᑣ஺2.᝞cfᑁhᵨ_waitiᑣ?=Qᐭᐸ\synchronized஺3.᝞cᐸ\j^_synchronizedᐵ`a$ᑁhdᨵᵨwaitᑣ஺4.᝞cᐸ\static2ᵨḄkl┝P]mḄa⁚ṹop☟᝱ḄklrBp☟᝱ḄᵨḄthis஺53ஹḄstᭆvஹḄst᝱=w᝱xyḄᐵz{|?=ᨵ}ᩩ᡻Dk᡻D;{|Ḅᩩ᡻Djᐵὶᨵ⌕᡻DḄMṹᓽ?=ᨵ}{MṹkCD{jᨵᓽmain᡻DḄ஺᝞ccpu2k᡻D}{ᕖUfᩭḄcpu᡻Da᡻Dbᑗᣚy-,Ḅa,bᙠk᡻Dᜧᙠkᨵᩩ¡ᑮ᜜hᐸ¤fᩩBa¥ᦪ§Bb¥ᦪ§ᵫᑗᣚy¨ᨚᡠ=ᜧjᙠk஺᝱[;Qᐭ;<᝱Az³´;<᝱ḄµBCD᝱,⍗ᑮsynchronized¸¹ᵫCD᝱µB«¬»Psynchronizedº»┝>ᵫ«¬µBCDᙠfXYZ?=ᵨwaitµBᢞ¯᝱PᐵὶḄMṹ᡻D¼>½B±²᝱஺

2854ஹ¾¿synchronizedjava.util.concurrent.locks.LockḄÀk?Â⌕ÃkÄ[Lock¼ᡂsynchronizedᡠ¤ÆḄᡠᨵÇÂ⌕kÄ[LockᨵsynchronizedÈÉḄ¸ÊÈḄឋ஺synchronizedÌ8ÍÎ┝Lock"⌕Ï{ᕒÑÒÍÎ$EFᙠfinally¹|ÍÎ஺Lock9ᨵÈÓᜧḄÇÔ᝞2ḄtryLock?=p«¬ÕÖ×┝஺ØÔÙÚÛ.Ü☢Ḅ⚪ᵨlockQD_ᦋᑏá[packagecom.huawei.interview;importjava.util.concurrent.locks.Lock;importjava.util.concurrent.locks.ReentrantLock;publicclassThreadTest{/***@paramargs*/privateintj;privateLocklock=newReentrantLock();publicstaticvoidmain(String[]args){//TODOAuto-generatedmethodstubThreadTesttt=newThreadTest();for(inti=0;i<2;i++)(newThread(tt.newAdder()).start();newThread(tt.newSubtractor()).start();))privateclassSubtractorimplementsRunnable(@Overridepublicvoidrun(){//TODOAuto-generatedmethodstubwhile(true)("synchronized(ThreadTest.this){System.out.println("j-="+j-)ä஻fæçÀè_┝ÍÎᔩU

29}*/lock.lock();try(System.out.println("j-="+j--);}finally(lock.unlock();)}}}privateclassAdderimplementsRunnable(©Overridepublicvoidrun(){//TODOAuto-generatedmethodstubwhile(true)("synchronized(ThreadTest.this){System.out.println("j++="+j++);}*/lock.lock();try{System.out.println("j++="+j++);}finally{lock.unlock();}}))}55ஹêë4ᐸ|ìí.jî^1ï᜜ì.jíð1஺ᑏñ{஺=Ü{:ᵨᑁhm¤Æ.jîðḄ᎛dᨵὃ⇋ô{õ⚪஺

30publicclassThreadTestlprivateintj;publicstaticvoidmain(Stringargs[]){ThreadTestltt=newThreadTestl();Incinc=tt.newlnc();Decdec=tt.newDec();for(inti=0;i<2;i++){Threadt=newThread(inc);t.start();t=newThread(dec);t.start();)}privatesynchronizedvoidinc(){j++;System.out.println(Thread.currentThread().getName()+n-inc:"+j);)privatesynchronizedvoiddec(){j-;System.out.println(Thread.currentThread().getName()+"-dec:u+j);)classIncimplementsRunnable{publicvoidrun(){for(inti=0;i<100;i++){inc();}))classDecimplementsRunnable{publicvoidrun(){for(inti=0;i<100;i++){dec();))))------÷ÑøᑏḄ--------classA{JMangerj=newJManager();main()

31newA().call();)voidcall{for(inti=0;i<2;i++){newThread(newRunnable(){publicvoidrun(){while(true){j.accumulate()}}})start();newThread(newRunnable(){publicvoidrun(){while(true){j.sub()}}}).start();}}}classJManager(privatej=0;publicsynchronizedvoidsubtract()(j-)publicsynchronizedvoidaccumulate()(j++ä))56ஹùúû10í¡ḼÂúû100,¡Ḽýþᑮùúû10í¡ḼøþᑮÂýúû100᝞úû50íÿᑏ஺ᨬḄṹ᝞publicclassThreadTest{/**

32*@paramargs*/publicstaticvoidmain(String[]args){//TODOAuto-generatedmethodstubnewThreadTest().init();)publicvoidinit()(finalBusinessbusiness=newBusiness();newThread(newRunnable()(publicvoidrun(){for(int0;iv50;i++)(business.SubThread(i);}))).start();for(inti=0;i<50;i++)(business.MainThread(i);))privateclassBusiness(booleanbShouldSub=true;//ᑴ᡻ḄpublicsynchronizedvoidMainThread(inti)(if(bShouldSub)try{this.wait();}catch(InterruptedExceptione){//TODOAuto-generatedcatchblocke.printStackTrace();)

33for(intj=0;j<5;j++)System.out.println(Thread.currentThread().getName()+”:i="+i+”+j))bShouldSub=true;this.notify();publicsynchronizedvoidSubThread(inti)(if(ibShouldSub)try(this.wait();}catch(InterruptedExceptione){//TODOAuto-generatedcatchblocke.printStackTrace();)for(intj=O;j<1O;j++)(System,out.println(Thread.currentThread().getName()+":i="+i+3+j))bShouldSub=false;this.notify();}))ᜓᩭᑏ☢Ḅ᦮ṹᨬᑏᩭḄṹ᝞⚪ᙠ#$%&Ḅṹ⌕(᯿*%+,ᓽ.$%&Ḅṹ⌕ᐳ0ᦪ2ᡠ45.$%&Ḅ᡻7ṹ8ᑮ*%:;

34//TODOAuto-generatedmethodstub/*newThread(){publicvoidrun()(for(inti=0;i<50;i++)(for(intj=O;j<1O;j++)(System.out.pnntln("i=u+i+",j="+j);)))}.start();7//finalStringstr=newString஺");newThread(newRunnable()(publicvoidrun()(for(inti=0;i<50;i++)(synchronized(ThreadTest.class){if(bShouldMain)(try{ThreadTest.class.wait஺;}catch(InterruptedExceptione){e.printStackTrace();))for(intj=O;j<1O;j++)(System.out.println(Thread.currentThread().getName()+“i="+i+"J="+j))bShouldMain=true;ThreadTest.class.notify();

35)☢=ᵨjdk5;Ḅ?@AᩭBCḄimportjava.util.concurrent.Executors;importjava.util.concurrent.ExecutorService;importjava.util.concurrent.locks.Lock;importjava.util.concurrent.locks.ReentrantLock;importjava.util.concurrent.locks.Condition;publicclassThreadTest{privatestaticLocklock=newReentrantLock();privatestaticConditionsubThreadCondition=lock.newCondition();privatestaticbooleanbBhouldSubThread=false;publicstaticvoidmain(String[]args)ExecutorServicethreadPool=Executors.newFixedThreadPool(3);

36threadPool.execute(newRunnable(){publicvoidrun()(for(inti=0;i<50;i++){lock.lock();try{if(!bBhouldSubThread)subThreadCondition.await();for(intj=O;j<1O;j++)(System.out.println(Thread.currentThread().getName()+",j="+j))bBhouldSubThread=false;subThreadCondition.signal();}catch(Exceptione){)finally(lock.unlock();)}}})threadPool.shutdown();for(inti=0;i<50;i++)(lock.lock();try(if(bBhouldSubThread)subThreadCondition.await();for(intj=O;j<1O;j++)(System.out.println(Thread.currentThread().getName()+)bBhouldSubThread=true;subThreadCondition.signal();

37}catch(Exceptione))finally(lock.unlock();})})57ஹEFCollection᪾HḄI᪀KLM@ᢵ⚪ᜩᓭQᓅSTUV⌕WXYZ[\]^_ᳮabcᓽ஺58ஹCollection᪾H;BCde⌕BCfghicomparable/comparator59ஹArrayListjVectorḄkXK.$%:lBCmListhi(ListhiopmCollectionhi)rsltᨵvᔠᓽxyᙠ.$%vᔠ;Ḅᐗ{Ḅ|}ltᨵ~Ḅ#᝱Ḅᦪᡃs44ᢥ|}%ᐗ{?ᐸ;Ḅᦪ2tᐕḄ.tHashSet:ḄvᔠḄᨬᜧ*ᜐ■HashSet:Ḅvᔠ4ᢥ<ᐸ;Ḅᐗ{ᐕᨵḄᐗ{(ᩭ⚪Ḅhashsetᨵᐵ¡¢m£¤¥ArrayListVectorḄ¦ᡃs=ᵨ§d¨©ªᨵᑭ#£¬⚪)஺hḼ®£ArrayListVectorḄkX.¯⌕ᒹ±$%¨☢.(1)*³ឋVectort&µᐰḄt£t·Ḅ¨¸¹t&*³ḄºArrayListt&µᐰḄ·Ḅ¨¸¹t&*³Ḅ஺᝞»Vᨵ%&¼½ᑮvᔠ¾ᨬ¿t=ᵨArrayList-À¢·ὃ⇋&µᐰᦔ᳛¼ÅÆ᝞»ᨵÇ%&¼½ᑮvᔠ¾ᨬ¿t=ᵨVectorÀ¢◤⌕ᡃsÉÊË<ὃ⇋jÌᑏ&µᐰḄṹ஺ᜓ§#Vector&ArrayListஹHashtable&HashMap⌕ÍÎ&µᐰḄ⚪ÍÎVectorHashtabletÏḄtjavaÐÑÒÓmḄ·st&µᐰḄArrayListHashMaptjava2Ô®ÒÓḄ·st&µᐰḄ஺ᡠ4ᡃsÕÖÔᐜÕὁḄ஺(2)ᦪ2ÙÚArrayListVectorlᨵ%ÛḄÜ,ᜧÝxyÞ·sß☢Ḅᐗ{Ḅ%ᦪàá

38mÜ,Ô◤⌕ÙâArrayListVectorḄxyã¹äå⌕Ùâxyã¹ÔtVÙâ%xyᓫᐗºtÙâÇ%xyᓫᐗäåÙâḄxyᓫᐗḄ%ᦪᙠᑁxã¹ᑭᵨᦔ᳛¹⌕ZèḄé⊝஺VectorëìÙÚ¢íᩭ$îºArrayListḄÙÚïᶍᙠᦻ᫏;ᨵ¬óôèõö÷ṹøᑮḄtÙÚ¢íᩭḄ1.5îù஺ArrayListVectorl4ú}ÛḄã¹ᜧÝVectorû4ú}ÙÚḄã¹ᜧݺArrayListᨵÒÓú}ÙÚã¹Ḅ¨¸஺üIᓽVectorÙÚíᩭḄîArrayListÙâíᩭḄ0.5î஺60'HashMapHashtableḄõᩩᳮû◤⌕᦮ᳮtᐜ£*þË£*þùHashMaptHashtableḄÿᐰḄᡂMap⌕ᙠHashMapᐕnullkey,ᵫᐰᙠ"ᨵ$%&'Ḅ()*ᦔ᳛⌕-Hashtable஺HashMapᐕ/null01$%entryḄkeyᡈὅvalue4Hashtable5ᐕ஺HashMap6HashtableḄcontains789ᣵ‘ᦋᡂcontainsvalue=containsKey஺>1contains78?᧕ABCDEF஺HashtableGHIDictionaryJ4HashMap®Javal.2K|MḄMapinterfaceḄ$%஺ᨬᜧḄ5PQHashtableḄ78QSynchronizeḄ4HashMap5QᙠR%&'HashtableS5◤⌕IU1VḄ78PW4HashMapXYZ1[\]᜜PW஺Hashtable=HashMap_ᵨḄhash/rehasha8ᜧᭆ$᪵ᡠeឋg5hᨵiᜧḄjk஺XHashMaplHashTable⌕mn7☢ᩭq஺$.ᔊtu>vHashtableQw▰yḄDictionaryJḄHashMap*Java1.2CMḄMapḄ$%zPWឋvHashtableQᐰḄ{XQqQPWḄ4HashM|Q}5ᐰḄ5QPWḄn.v"ᨵHashMap~eA/01$%⊤ḄᩩḄkeyᡈvalue61'ListMap$%QᓫᑡᦪḄᔠ$%Q=᪵ḄᑡᦪḄᔠListḄᦪQᨵ}ᐕM|ḄᦪQᨵ}ḄᐸQ5gḄVḄQ~eᨵḄ஺62ஹList,Set,Mapᔲ"#$Collection%&ListSetQMap5Q

3963'List'Map'Setn%ᐗSᔜᨵᱯ᪵Ḅ⚪¡¢£¤ᢵ⚪v᪵Ḅ⚪¦§ὃ©ª«%7☢Ḅ©ªv$Q⌕¬®¯°ᑁ?zQ⌕ᨵ§²Ḅ³´=⊤µg¶஺᝞¸®¯¹⊤µ5º»ᙠB¼½ᑣ¿P5®¯஺✌ᐜListlSetᐹᨵÃÄឋVQᓫᑡᐗḄᔠᡠeVᨵ$%ÅᐳPḄ᱄ÈCollection஺Set½☢5ᐕᨵḄᐗᡠÉᓽ5gᨵ«%ÿ(Ì£5QÍÍQÃP)ḄÏÐᓽᎷÒSetᔠᨵ$%AÏÐᙠᡃ⌕ᔣSetᔠÕB$%BÏйBÏÐlAÏÐequalsÿᑣBÏÐ5M9ᡠeSetᔠḄadd78ᨵ$%booleanḄÖ×ØᔠᨵÙ%ᐗÚSadd78~ᡂÅÛᐭÝᐗSᑣÖ×trueØᔠÞᨵlÙ%ᐗequalsÿḄᐗSÚSadd78ß8ÛᐭÝᐗÖ×´¸1false஺SetᐗS8qàá%"geIteratorâᡠᨵḄᐗÕ⌲$äᔊᔜ%ᐗ஺List⊤åᨵᐜæ}ḄᔠÌ£5Q¼çᢥéê'ᢥᜧìஹᢥîï[JḄ᣸}஺ØᡃRñòᵨadd(Obje)78SóñÛᐭḄÏÐXôõö÷øἠᨵ᣸ú}$᪵ᢥᐜᩭæᑮḄ}᣸}஺ᨵS᎛{~eýúᓽòᵨadd(intindex,Obje)78X~eᢣÿᙠᔠḄ஺Listᵨadd!ᐭᔠᐸ$%&'()*+ᔠ,'ᙠᔠᵨ-./0ᢣᔣadd34ᓽ67ᔠᨵ3-.ᢣᔣ+᝞:xᡠ<஺List◀+Iterator>?@AᡠᨵḄᐗCD⌲FᔊᔜᐗCI᜜Kᵨget(indexi)ᩭMNOM@PQ஺MapRListSSet&TU'VᑡḄᔠ1ᐸᨵputXY᝞Z[put(objkey,objvalue)4⌕key/value>&^_Ḅkey_Ḅ`ᑣb'ᢥequalsde6f஺@ᑣ᪷hkeyiA6jḄvalueᓽget(Objectkey)klmnkeyᡠjḄvalue஺o᜜biAᡠᨵḄkeyḄpᔠKiAᡠᨵḄvalueḄpᔠKiAkeySvalueqᔠᡂḄMap.EntryḄᔠ஺ListᱯXtᩭᢝᨵᐗCᨵ_ᐗC஺Setvwᨵ_ᐗCᑁy᣸t஺Map{key-valuemvalue3m஺HashSetᢥ᯿hashcodemḄ}~,&'>ᢥhashCodemḄᜧ஺᝞"abc”--->78'"def"—>62'"xyz"—>65ᙠhashSetḄt&'62,65,78⚪ᏉḄᕒᨬṹ¡¢)£¤ᕒᨵ3¥^¦ṹ஺LinkedHashSetᢥ!ᐭḄt§ḄhashcodeKᨵ¨©ªᵨᕖ¬ᕒIhashsetᔠde®'ᔲ6f✌ᐜhashcode'ᔲ6fᯠequals'ᔲ6f஺new®Student!ᐭᑮHashSetHashSetḄsize$´hashcodeSequalsDsize஺TᙠVectorµᐭ3஺¶ᔠ·☢µᐗC67ᔠ·ᵨ᪷¹º»>ᑮ+¼᪗஺¶HashSetᓾµ&+3Ḅ஺

4064ஹOArrayList,Vector,LinkedListḄឋ^SᱯឋArrayListSVectorÁ'ÂᵨᦪqᦪhÄᦪqᐗCᦪᜧ7$▭ḄᦪhÆǵS!ᐭᐗCUÈÁᐕÊ>ᢥtË-.ᐗCÌ'!ᐭᐗC⌕ÍÎᦪqᐗCÏÐfᑁѪᡠ-.ᦪhÒ,!ᐭᦪh᠒Vectorᵫ7Âᵨ+synchronized(Ö×Øᐰ)Ûឋ^ÜeArrayListÝ,LinkedListÂᵨVᔣÞ⊤$´ᢥtË-.ᦪh◤⌕ᔣᡈᔣFᔊÌ'!ᐭᦪh4â◤⌕ãä)⚗Ḅ⚗ᓽᡠ!ᐭæçeÒ஺LinkedListb'Ö×&ØᐰḄLinkedListè+ÂALinkedListªᚮ᪘SëᑡᩭÂᵨ஺65ஹìᣵVectorᔠ_ḄᐗCVectornewVector=newVector();For(inti=0;i?õöRḄ>?÷⌕ᨵSetSList.Collections'┐ᔠóḄùúóèûᑡ☟᝱$´ᔜ~ᔠḄþ-ஹ᣸tஹÖ×Øᐰᓄ஺67ஹSetḄᐗḄᵨᩭᑖᔲᕖᵨ==equals()?ᨵ!"SetḄᐗḄᐗᔲ#ᵨequals()%&ᑨ(Ḅ஺equals())==*+,ᵨ-ᔲᢣᔣ0123equals()ᙠ567⌚9:Ḅ;<=ᑖ>Ḅ23Ḅᑁ@)5ABCḄDEFG-஺

4168ஹHᡠJ⍝ḄLᔠ5NᨵOPQ⌕ᨬTᵨḄLᔠ5List)Map஺ListḄᐹVWXᒹZArrayList)Vector[\ᜧ^Ḅᑡ⊤ab〉ᔠ᪀eஹfg)h!5A23Ḅᐗᑡ⊤஺List〉ᵨiᢥᦪ-l,mnᐗḄop஺Mapqrs1=tuᵨḄᐗfg஺MapLᔠ5ᵨifgᐗ2(w"y")"-”).ᐸ6~=y᧜ᑮ1=-஺ArrayList/VectorListCollectionHashSet/TreeSetSetPropetiesHashTableMapTreemap/HashMapᡃḄᡃJ⍝NᨵᑤᦋḄPḄᐹVwᡃ2iset•ᜧᭆḄadd,remove,contains2imap>ᜧᭆḄput,remove-contains:ᡃ⌕ᙠeclispeᢥᯠḄPᩭs஺ᡃḄ1PList5ᨵget(intindex)᪵Ḅ:[¢ᢥ£¤¥ᐗset56¦ᨵget(intindex)᪵Ḅ஺List)setN[¢§¨ᡠᨵᐗ§¨©ᐜ⌕ᑮ1=iterator23>ᡠ¢-set)list5Nᨵ1=iteratorᵨiEF=iterator23஺map[¢EF¬=Lᔠ1=EFᡠᨵḄkeyḄLᔠ,®᜜1=EFḄᡠᨵvalueḄLᔠ>°1=EFḄkey)value±ᔠᡂḄEntrySet23ḄLᔠ,map³ᨵget■µᦪkeyEF-key2¶Ḅvalue஺69ஹ<=23-B0(x.equals(y)==true)ᓾ[ᨵ0Ḅhashcode¸D22?2஺᝞»23⌕¼fᙠHashSetᡈHashMap6ḄequalsBḄhashcode-¾¿B஺᝞»⌕¼fᙠHashSetᡈHashMapᑣhashcode¦ᨵᐵÂs©᎛hashcode[¢ḄÄ᝞arrayListfgḄ23ᵨWXhashcode);ᯠᡃ¦ᨵᳮᵫWXuTNÇWXḄ஺

4270ஹTreeSet☢É23᝞»0©Éᐭs᱄5)Ì5ḄWÄ23ab©#ᵨḄ᱄5ḄcompareTo#ᵨḄÌ5ḄcompareToÍÎTÏ(¶Ð¦ᨵ┐2n⚪ḄÓᑗḄÕᫀ;×ḄaddÉØḄO=23ÙᵨO=23ḄcompareToÚi=compareToÛÜÝ;×=23Ḅ56᝞!Þᑏ=Ḅ)Wà¨ṹâpublicclassParentimplementsComparable{privateintage=0;publicParent(intage){this.age=age;)publicintcompareTo(Objecto){//TODOAuto-generatedmethodstubSystem.out.println("methodofparent");Parento1=(Parent)o;returnage>o1.age?1:age

43System,out,println(set.size());}}71ஹã1PTᵨḄ5ᒹäåæᔜè5=⌕éØêëìH2javaeeíîïᡠ¢ððᑡcorejava6ḄPñò⌕óᑡHᙠÜssh⚗õ6ö÷ḄPñò஺ᑏHᨬøᑏḄPù¤6ö÷ḄP5஺TᵨḄ5:BufferedReaderBufferedWriterFileReaderFileWirterStringIntegerjava.util.DateSystemClassஹList,HashMapTᵨḄᒹâjava.langjava.iojava.utiljava.sqlJavax.servlet,org.apache.strtuts.action,org.hibernateTᵨḄäåâRemoteListMapDocumentNodeList,Servlet,HttpServletRequest,HttpServletResponse,Transaction(Hibernate)ஹSession(Hibernate),HttpSession72ஹjava6ᨵûü5AḄýJDK:~ü5AḄýqrs1Pþ35¢rÿᑖ⁚஺⁚InputstreamOutputstreamInputStreamReaderOutputStreamWriter஺ᙠjava.ioᒹᨵᐸḄ⌕!"#$ឋ&'(ᵨ*+஺73ஹ⁚-Ḅ.⌕/0ᱏ23ᑴᦪ6ᦪ6⌲08ᑮ:;<ᜓᡈὅ@:;<ᜓ⌲0AB0ᱏ23ᑴᦪ6CD8ᐭ8<ᜓFGᡃ⌕ᵨI0Ḅ*JᩭLᡂNOPᵨ0QRSḄ*J3TUVN;RSUV*JWX!஺YZḄRS!Outputstream'InputstreamC[Ḅ\]^_⊤C[Ḅ8ᐭ'8<ᜓab┐Y⁚3TOPḄ஺

44ᙠZᵨde⌕LᐰḄ0gᦻi8jᡈA3ᩭᵨ⁚klᔩnopḄ0ᑗᨬsb23ᑴḄ⁚tJuᙠ஺Y“w”N✌ᐜ⌕{ᑮᐸYZḄ⁚ᯠ}~⁚ᑏᐭᑮ8஺AB✌ᐜAᑮḄ⁚kᡃ⌕/a!ᡃ◤⌕~⁚ᣚᡂ஺ᵫN᪵Ḅ◤#"Ḅᒹ஺<ᜓ⁚ᦪ6ᨵ᎛⌕ᑏᑮ<ᜓ◤⌕~ᡂ⁚3Tᑏᐭ஺⁚Ḅᒹᑣaᑁ~ᡂ⁚ᑏᐭ<ᜓN!ᡃᔣIO<ᑏᐭᡈAB#"0¡¡*+஺ᔣ⁚ᣚ⌕¢£¤ṹḄ¦⚪¨!ᡂ⁚ᦪ©ᐸ\ᡂªḄ:Q¤ṹḄ⁚tJAB«¬Ḅ⍝ᳮ஺°±⁚-ᐵ³Ḅ_ṹᫀµ¶importjava.io.BufferedReader;importjava.io.FilelnputStream;importjava.io.FileOutputStream;importjava.io.FileReader;importjava.io.FileWriter;importjava.io.InputStreamReader;importjava.io.Printwriter;publicclasslOTest{publicstaticvoidmain(String[]args)throwsException{Stringstr="w”·/*FileOutputStreamfos=newFileOutputStream("1.txt");fos.write(str.getBytes("UTF-8"));fos.close();*//*FileWriterfw=newFileWriterC'l.txr);fw.write(str);fw.close();*/PrintWriterpw=newPrintWriterf'1pw.write(str);pw.close();/*FileReaderfr=newFileReader(H1.txt");char[]buf=newchar[1024];intlen=fr.read(buf);StringmyStr=newString(buf,O,len);System.out.println(myStr);7/*FilelnputStreamfr=newFilelnputStream("1.txt'*);byte[]buf=newbyte[1024];intlen=fr.read(buf);StringmyStr=newString(buf,0,len,"UTF-8");System.out.println(myStr);*/

45BufferedReaderbr=newBufferedReader(newlnputStreamReader(newFilelnputStream("1.txt"),"UTF-8"));StringmyStr=br.readLine();br.close();System.out.println(myStr);)}74ஹFGjava¸ᑡᓄ᝞¼\]java¸ᑡᓄᡈὅ±½Serializable¾ḄPᵨ஺ᡃᨵ᎛~0;javaYS¿ᡂ⁚ḄtJÀjᡈὅ@0;⁚ឮÂᡂ0;javaYSµ᝞⌕~javaYSuÃᑮÄÅᡈὅÀ〈ÇÈÉÊḄᐸnopN;ËÌᡃklÍÎᑏ_ṹj/0;javaYS¿ᡂ:;ÏJḄ⁚À8ÐjreiÑ^#"NQÒᢝᡃklÔᵨOutputstreamḄwriteObject*ÕᩭÖ᝞×⌕ØjavaÙᡃÖ⌕ÚÀ8ḄYSÛÜ\]serializable¾N᪵javac¤Ý^Þ3Tᱯàᜐᳮ¤ÝḄâklÚwriteObject*ÕOPN^ᡠäḄ¸ᑡᓄ஺◤⌕Ú¸ᑡᓄḄÛÜ\]Serializable¾ª¾0;mini¾ᐸåᨵ◤⌕\]Ḅ*ÕimplementsSerializable!"᪗¢ªYSkÚ¸ᑡᓄḄ஺µ᝞ᙠwebçè᝞×YSÚéuᙠ"Sessionêtomcatᙠëì⌕/SessionYS¸ᑡᓄᑮÄÅN;YS^ÛÜ\]Serializable¾஺᝞×YS⌕dËᑖíJ³I3TÈÉÀ8ᡈîËrmiïÌÔᵨN^◤⌕ᙠÈÉÊÀ8YSÚÀ8ḄYS^ÛÜ\]Serializable¾஺75ஹUV0ðJVMñòclassᦻóḄôᳮpᑴJVMḄòᵫClassLoader'aḄõᩭ\]ḄJavaClassLoader0;ë⌕ḄJavaöT³I©ó஺a÷øᙠöTùú'ᦻóḄ஺76'heap'stackᨵFG.஺javaḄᑁuᑖ!û0᪘ᑁu0ᚮᑁu஺᪘ᑁuᢣ̸3ᐭ0;*Õ

46Þ!N;*ÕᓫᑖᙽᵨᑁḄᑖḄ᪘᪘!Ḅ"#$%஺ᚮ()᪘*ᵨ+,Ḅᑁ-ᵨ+ᙠ/᪘!Ḅ01ᦪ34᝞6ᵨnew78Ḅ9:;ᙠᚮ<ᡠ>?+$Ḅ@Aᜫ஺!Ḅ6ᵨᡭnalD⛲Fᙠᚮ!@+(᪘!஺77ஹGC(HIJKHI⌕ᨵGC?GC(ᚗOᦈQḄRS(GabageCollection),ᑁᜐᳮ(YZ[ᕒ]᧕_`a⚪Ḅᙢdeᡈὅ┯iḄᑁjᦈklZmᡈnoḄ+pqrstuJavawxḄGCyz{>|}~9:(ᔲ*ᵨ@ᑮ|}jᦈᑁḄḄJavaᨵwxᑖᑁḄ*஺78ஹᚗOjᦈḄᳮ஺ὃ⇋2jᦈᑴ஺Java!℉Ḅᱯ(ᐭᚗOjᦈᑴ6C++Zmᕒᨬᜮ¡Ḅᑁ¢ᳮḄa⚪£ᑓ@¥?6¦JavaZmᕒᙠYᑏZmḄ᎛+©◤⌕ὃ⇋ᑁ¢ᳮ஺ᵫᨵᚗOjᦈᑴJava!Ḅ9:+©ᨵ"*ᵨ"Ḅᭆ®¯ᨵ9:Ḅᵨ°ᨵ"*ᵨ"஺ᚗOjᦈ{>ᨵᦔḄ■³ᑁ´☄ᨵᦔḄ6ᵨ{>6ᵨḄᑁ஺ᚗOjᦈᘤ·¸(*KᓫḄº»¼Ḅ½Z¾¿+{⚜ÁḄÂÃÄ9ᑁᚮ!ÅÆÇḄᡈὅÈᨵ6ᵨḄ9:É¿ÊËjᦈZmᕒ+zÌḄÍᵨᚗOjᦈᘤ9Î9:ᡈᡠᨵ9:É¿ᚗOjᦈ஺jᦈᑴᨵᑖÏÐᑴᚗOjᦈ᪗eᚗOjᦈÒᚗOjᦈ஺79ஹᚗOjᦈᘤḄÓÔᳮ(HIJᚗOjᦈᘤ{>ÕÖjᦈᑁᔩJᨵHIØÙ}·ÁÚÛÉ¿ᚗOjᦈJ9GCᩭÝZmᕒ789:GCÞß~à9:Ḅᙢᙬஹᜧã>ä6ᵨÂÃ஺·¸GCåᵨᨵᔣçḄèeé¢ᳮᚮ(heap)!Ḅᡠᨵ9:஺·èêqë19:("{Ḅ"ë19:("+{Ḅ"஺GCêq19:K“+{"GCᨵíîjᦈ1ᑁ஺{>஺Zmᕒ{>ï}᡻¿System.gc஺·ÁGC¾¿ñ(Javaò+ôõGCq᡻¿஺80'HI᎛ᵨassert஺assertionf÷)ᙠøùÞú!(¸ᵨḄÍûèüýÞú!;þᢝᑴ஺ᙠ

47>assertionᙠḄᩩboolean⊤!"#$boolean⊤Ḅ%&true'᝞)*%&false+,-.ᜐ01Ḅ2᝱4assert56789ᡈ⌨7஺<ᩭ+assertionᵨ0#$ᨬ@AஹᐵDḄឋ஺assertionFGᙠHIJKLMHN஺&OPQឋRᙠSTIUVassertionFGᐵWḄ஺packagecom.huawei.interview;publicclassAssertTest{/***@paramargs*/publicstaticvoidmain(String[]args){//TODOAuto-generatedmethodstubinti=0;for(i=0;i<5;i++)(System.out.println(i);)//Ꮇ\1]^_OT'-i'asserti==5;))81'java'()ᙠᑁ),-ᔩ/0ᓫ23஺ᡠbᑁde☄ᢣ1hijᵨḄkᡈlmniᓰpᙠᑁd஺javaᨵᚗstᦈᑴvw#$k1hixᵨḄM᎛ᓽk{O|}ḄM᎛k5~iᚗstᦈᘤᑁd◀ᣵ஺ᵫ0JavajᵨᨵᔣḄᚗstᦈᳮvw◀xᵨḄ⚪᝞ᨵkxᵨ⌕J᪷1vḄGCvwtᦈḄ᝞4☢Ḅṹvwᑮ¡Ḅᑁdtᦈ¢packagecom.huawei.interview;importjava.io.lOException;publicclassGarbageTest{/***@paramargs*@throwslOException7

48System.out.println("exitgctestl'1);)privatestaticclassPerson(byte[]data=newbyte[20000000];Personmate=null;publicvoidsetMate(Personother)mate=other;)

49javaḄᑁde☄Ḅ¡¢£¤¥ᕜ§Ḅkᢝᨵ©¤¥ᕜ§kḄxᵨªvRI¤ᑁde☄«©¤¥ᕜ§k-.1h◤⌕®&£¤¥ᕜ§kᢝᨵḄxᵨ¯°±1Ritᦈjavaᑁde☄ḄI¤²³F´ᙢ+ᕒvR·¸OkwVn1hjᵨkkᓾnixᵨᓽkºᵨᓾº»iᚗstᦈᘤtᦈḄjavavR7ᑁde☄Ḅ¡᝞¼d½¾ᡃÀÁOkÂᙠ¼d(᝞ÂᙠᐰÅmapk)ᯠVn1hjᵨkni¼dxᵨᓾ1hijᵨ஺javaḄᑁde☄Ç⌕È5ᔜᑖË¡ÌÍ᦮᡻ᑮÐÑᯠVÒkᔲijᵨÔ᝞)Õᨵᑣ×RᑨÇkÙ0ᑁde☄஺᝞)᜜ÛÜḄkḄ»ÝtOᑁÛÜḄkᑁÛÜki£§xᵨOᓽj᜜ÛÜk1hijᵨᵫ0ᑁÛÜᢝÞ᜜ÛÜḄk᜜ÛÜk51ßiᚗstᦈß⌼ᡂᑁde☄஺4☢ᑁâᩭ~0ãä(å⌕ᱯçèᚮ᪘ḄÒᐗìí1îïðᦪòóᣵ¯ðdôḄõᦪö÷AøᑏúvwûüᙠóᣵÒᐗìMýþÈᦪòᜫᐗᡠᙠḄḄnullᓽ)ᡃᙠᑮᚮ᪘ᐺḄ!"#ᡃ$⌕&ᵨ()Ḅ*☢Ḅ,ᡃᑮḄ,-./ᑮḄ0ᯠ᝞34ᨵᙠ-./ᑮ6789:;ᡃ<=>Ḅᑮ,:ᡃ?,ᡃ<=ᑮḄ>4ᨵ)@AḄ஺publicclassStack{privateObject[]elements=newObject[10];privateintsize=0;publicvoidpush(Objecte){ensureCapacity();elements[size++]=e;)publicObjectpop(){if(size==0)

50thrownewEmptyStackException();returnelements[--size];)privatevoidensureCapacity(){if(elements.length==size){Object[]oldElements=elements;elements=newObject[2*elements.length+1];System.arraycopy(oldElements,0,elements,0,size);))).☢ḄCᳮEFGHᓫᎷ᝞ᚮ᪘K10ᐗᯠLᐰNOPᩭRᯠᚮ᪘,SḄ4ᨵᡃT⌕ḄUVW,X,YZ,[\]ᦈḄX_`ᔠᑁcd☄Ḅfᩩh[ᵨ[\]ᦈ஺W,i,cᙠX᪵ḄUV>8klm"no᪵ḄL3᝞3Xᚮ᪘ᵨḄpq>irstKᑁcuvwxᡃTḄᑁcy.GTz{lᨵno|}~?XUVGil]ᦈḄᨵnoᐵ஺*☢/f஺1publicclassBad{publicstaticStacks=Stack();static{s.push(newObject());s.pop();//X{ᨵ8YZᑁcd☄

51s.push(newObject());//.☢ḄYZ!]ᦈ#,<ៜ)),statici8cᙠᑮ⌨PW,ᡃT>!/ᑮᨵ<ៜ6i,?᝞3ḄStackᨬᨵ100YZoᨬ>iᨵ100YZ[\]ᦈᐸXEFG᧕ᳮ,StackᑁNᢝᨵ100&ᵨᨬḄi,Ty,[ᵨḄᡃT8Ḅ!¡Ḅ&ᵨ<ᯠ¢ᜫ¤ᑁcd☄Ḅ¥᜜8§08YZc¨HashSet©ᔠª!Li6«ᦋXYZªḄ®¯°±²³Ḅ´9ᔲᑣYZ«ᦋLḄ²³¯ᨬ·c¨HashSet©ᔠª:Ḅ²³i¸ᙠX§*ᓽ¹ᙠcontainsº\¹ᵨFYZḄ0¡&ᵨ»Ḅ®ᦪ½HashSet©ᔠª¾¿YZ>À]ÁᑮYZḄÂ3X>lm"[\ÃHashSet©ᔠªᓫÄᑤ◀0¡YZ⌼ᡂᑁcd☄஺82ஹ454$6ᑏ89:;java.Iang.String?!WᙠEᵨḄ:᎛◤⌕ᵨ<=ḄËKÌᘤ½KÌᔲᑣÎḄËKÌᘤÏÐ,½KÌjre.jarᒹªḄjava.Iang.String஺ᵫ#ᙠtomcatḄwebEᵨªy,ᵫwebapp<=ḄËKÌᘤᐜ<=KÌWEB-INF/classessÔÕªḄËᯠL_Öᡲ.ØḄËKÌᘤKÌ᝞3ᡃTᙠtomcatḄwebEᵨªᑏ8java.Iang.StringÚX:᎛ServletKÌḄi,ᡃT<=ᑏḄjava.Iang.StringW,XoÛilPGÜᙠḄÝ⚪Cᩭᡠᨵᵨjava.Iang.StringËḄyPßÝ⚪஺Rᯠjavaàáendorsedᢈã!⌚åjdkªḄæËᐹèé\,.஺W,6ë⌚åḄË,ᨵ▲ᑴïwxᒹðjava.langX᪵ḄᒹªḄË஺(*☢Ḅ᝞ò⌕,ó#ᜧõö÷ᳮᵨ⌕»øᫀḄ8Nᑖᔲᑣ)õᝰᶧ,⚪Ôd☄)᝞ýþ*☢Ḅpackagejava.lang;publicclassString{/**@paramargs

52*/publicstaticvoidmain(String[]args){//TODOAuto-generatedmethodstubSystem.out.printlnCstring");))Ḅ┯᝞java.Iang.NoSuchMethodError:mainExceptioninthread"main"jreḄjava.lang.Stringᨵmain஺83.Javaṹ!┯1.abstractclassName{privateStringname;publicabstractbooleanisStupidName(Stringname){})ᜧ#$ᨵ%┯&'ᫀ┯஺abstractmethod)*+ᑖ-./0123-஺2.publicclassSomething{voiddoSomething(){privateStrings=intI=s.length();))ᨵ┯ᔩ&'ᫀ┯஺567891:;<=%>?@⛲B(privatepublicDprotected)஺finalE+ᵨᩭ@⛲5678(final᝞HabstractDstrictfpIJ>?@⛲BstrictfpK:@⛲classDmethodJvariable)஺3.abstractclassSomething{privateabstractStringdoSomething();

53)LMNO┯ᔳ&'ᫀ┯஺abstractḄmethods1:+private@⛲஺abstractḄmethodsQRSimplement(TU)ᐹWX⁚ḄZOE+ᵨprivate[abstractmethod\┝^ᩭᕖ&(Hᳮabstractmethod91:final)஺4.publicclassSomething{publicintaddOne(finalintx){return++x;))abcde஺'ᫀ┯஺intxf@⛲ᡂfinalhᕡḼx1:ᙠaddOnemethodf@ᦋ஺5.publicclassSomething{publicstaticvoidmain(String[]args){Othero=newOther();newSomething().addOne(o);)publicvoidaddOne(finalOthero){o.i++;))classOther{publicinti;)Dm☢ḄopqIᐵsfinalḄ?⚪ᨵ┯ᔩ&'ᫀuv஺ᙠaddOnemethod>xᦪof@⛲ᡂfinal஺᝞zᙠaddOnemethod{ᡃ$@ᦋ஺Ḅreference(b᝞o=newOther();)}O᝞Hm~⚪┯Ḅ஺{@ᦋḄoḄmembervairable(ᡂᕒ78)஺Ḅreferenceᨵᦋ7஺6.

54classSomething{inti;publicvoiddoSomething(){System.out.println("i=0+i);))ᨵNO┯ᕖ&1ᩭ஺'ᫀuv஺Ḅ"i=0"஺intiinstantvariable(T~78ᡈᡂᕒ78)஺instantvariableᨵdefaultvalue஺intḄdefaultvalue0஺7.classSomething{finalinti;publicvoiddoSomething(){System.out.pnntln(Hi=H+i);))Dm☢⚪Kᨵaᙢ1HQafinal஺⍝Q┯ᔩ&'ᫀ┯஺finalintiafinalḄinstantvariable(T~78ᡈᡂᕒ78)஺finalḄinstantvariableᨵdefaultvalue)*ᙠconstructor(᪀⌼ᘤ).9fadvḄ஺E+@ᦋ"finalinti=0;*'஺8.publicclassSomething{publicstaticvoidmain(String[]args){Somethings=newSomething();System.out.println("s.doSomething()returns"+doSomethingO);)publicStringdoSomething(){return"Dosomething…”;)

55)mo஺'ᫀ┯஺mᙠmain{calldoSomethingᨵNO?⚪amethodsIᙠHaclass{஺XmainstaticḄ஺staticmethod1:callnon-staticmethods஺Eᦋᡂ"System.out.println(Ms.doSomething()returns"+s.doSomethingO);"஺Hᳮstaticmethod1:>?non-staticinstantvariable஺9.¡ᜐSomethingḄᦻ¤¥OtherThing.javaclassSomething{privatestaticvoidmain(String[]something_to_do){System.out.printlnC'Dosomething...”)¨))aLMode஺'ᫀuv஺©ᩭᨵª«¬JavaḄClass¥)*Dᐸᦻ¤¥pH஺publicclassḄ¥)*Dᦻ¤¥pH஺10•interfaceA{intx=0;}classB{intx=1;)classCextendsBimplementsA{publicvoidpX(){System.out.println(x);)publicstaticvoidmain(String[]args){newC().pX();

56)'ᫀ┯஺ᙠ¯°±²³´┯(┯µ¶1HḄJVMᨵ1HḄ·¸h¹QºdvḄx»ᵨaxIᓛ½(Q¾ᙠH±importjava.utilDjava.sqlaᒹ±ÀdDate᪵)஺Âs᱄Ḅ78E+ᵨsuper.xᩭdvÄḄឋÆÇ◚Épublicstaticfinal.ᡠ+E+ˬA.xᩭdv஺11.interfacePlayable{voidplay();)interfaceBounceable{voidplay();)interfaceRollableextendsPlayable,Bounceable{Ballball=newBallCRingPang'*);)classBallimplementsRollable{privateStringname;publicStringgetName(){returnname;}publicBall(Stringname){this.name=name;)publicvoidplay(){ball=newBall(HFootbair);System.out.println(ball.getName());))a┯1Ì᧕³U஺'ᫀ┯஺"interfaceRollableextendsPlayable,Bounceable"ᨵ?⚪»interface

57EÏÐainterfacesᡠ+{┯஺?⚪ᙠinterfaceRollable{Ḅ"Ballball=newBall(^,PingPang'^);,^஺=%ᙠinterface{ÀdḄinterfacevariable(Ä78EÑᡂᕒ78)ÆÇpublicstaticfinal஺Q«"Ballball=newBall("PingPang”)ÒT▭m"publicstaticfinalBallball=newBall(',PingPang");,,ᙠBallḄPlay()"ball=newBall("Football',);Hᦋ7ballḄreference{ḄballᩭRollableinterface»Rollableinterface{ḄballpublicstaticfinalḄfinalḄobject1:fᦋ7referenceḄ஺¡¯°ᘤÔᙠ"ball=newBallC'Football");"{eÕᨵ┯஺Ö.×دÙ1'¯ᑏaÙÜÔa.txtᦻ¤ḄᓫÞØb.txtᦻ¤ḄᓫÞßàᔠᑮC.txtᦻ¤a.txtᦻ¤ḄᓫÞᵨãäBᑖ◞b.txtᦻ¤ᵨãäᡈæçèéᑖ◞஺'packagecn.itcast;importjava.io.File;importjava.io.FileReader;importjava.io.FileWriter;publicclassMainClass{publicstaticvoidmain(String[]args)throwsException!FileManagera=newFileManager("a.txt",newcharÄ{'

58'});FileManagerb=newFileManager(Mb.txtn,newcharnCXn'¨'});FileWriterc=newFileWriter(”c.txt")¨StringaWord=null;StringbWord=null;while((aWord=a.nextWord())!=null){c.write(aWord+H

59M);bWord=b.nextWord();if(bWord!=null)c.write(bWord+"

60H);}while((bWord=b.nextWord())!=null){c.write(bWord+H

61M);)c.close();}

62}classFileManager{String[]words=null;intpos=0;publicFileManager(Stringfilename,char[]seperators)throwsException{Filef=newFile(filename);FileReaderreader=newFileReader(f);char[]but=newchar[(int)f.length()];intlen=reader,read(but);Stringresults=newString(buf,O,len);Stringregex=null;if(seperators.length>1){regex=""+seperators[0]+T+seperators[1];}else{regex=""+seperators[0];)words=results.split(regex);}publicStringnextWord(){if(pos==words.length)returnnull;returnwords[pos++];))2ஹ¯ᑏaÙÜÔd:\javaëìḄᡠᨵ.javaᦻ¤íᑴᑮd:\jadëìÔïᩭᦻ¤Ḅ᡽ñ¥©.javaᦋ.jad஺(ᜧòuᙠóm☢⍝⚪ômõᑮḄö÷øóó⍝⚪ùúû)*:¯ᑏüýᓫ?⚪Ḅṹþ)'listFilesÿFileFilterFileFilter⇋ḄᶍḄḄFileFilterᓽḄᶍ஺importjava.io.File;importjava.io.FilelnputStream;

63importjava.io.FileOutputStream;importjava.io.FilenameFilter;importjava.io.lOException;importjava.io.Inputstream;importjava.io.Outputstream;publicclassJad2Java{publicstaticvoidmain(String[]args)throwsException{FilesrcDir=newFile("java");if(!(srcDir.exists()&&srcDir.isDirectory()))thrownewException("ᙠ")File[]files=srcDir.listFiles(newFilenameFilter(){publicbooleanaccept(Filedir,Stringname){returnname.endsWith(".javaH);}))System.out.println(files.length);FiledestDir=newFile(*'jad");if(!destDir.exists())destDir.mkdir();for(Filef:files){FilelnputStreamfis=newFilelnputStream(f);StringdestFileName=f.getName().replaceAII("\\.java$w,M.jad");FileOutputStreamfos=newFileOutputStream(newFile(destDir,destFileName));copy(fis,fos);fis.close();fos.close();))privatestaticvoidcopy(lnputStreamips,Outputstreamops)throwsException{intlen=0;byte[]but=newbyte[1024];while((len=ips.read(buf))!=-1){ops.write(buf,0,len);))

64)ᵫ"⚪$%Ḅ&'(ᶍ)*Ḅ+᪆-1.classjad2java{1..ᑮ01ḄᡠᨵḄjavaᦻ56ᔠ1.1.ᑮFilesrcDir=newFile(”d:\\java")1.2.ᑮ1Ḅᡠᨵjavaᦻ5-File[]files=srcDir.listFiles(newMyFileFilter());1.38'.ᑮ.javaḄᦻ5-classMyFileFilterimplememytsFileFilter{publicbooleanaccept(Filepathname)(returnpathname.getNameO.endsWithJ^.java"))}2.9:ᦻ5;ᑴᑮ=᜜?ᦋ᡽BC2.1.ᑮ᪗᝞F᪗ᙠᑣHIJ2.2᪷LMᦻ5C.ᑮ᪗ᦻ5CNO⌕ᵨRᑣ⊤T*NO•ḄVW஺2.3᪷L⊤XḄFileY᪗ᦻ5CḄZ[\.ᑮ⊤X᪗ᦻ5ḄFile஺஻⌕ᙠ^_`abᙢHIdᦻ5◤⌕f⍝ᦻ5CYᦻ5Ḅ஺2.49Mᦻ5Ḅhijᡂ᪗ᦻ5hijlmnoᡂplmlmḄqᦪsᵨthḄu*஺//lmwxḄqᦪyz{|☢ᔣ᱄yt᪵〉☢஺}ᑖ᪆listFileslmᑁḄᶍ)*ᳮFile[]listFiles(FileFilterfilter){FileQfiles=listFilesQ;//ArraylistacceptedFilesList=newArrayList();File[]acceptedFiles=newFile[files.length];intpos=0;for(Filefile:files){booleanaccepted=filter.accept(file);if(accepted){//acceptedFilesList.add(file);acceptedFiles[pos++]=file;)Arrays.copyOf(acceptedFiles,pos);//return(File[])accpetedFilesList.toArray();)

653ஹᑏZ[\ḄᦪᐭpZ[\YZ⁚ᦪdpᢥZ⁚ḄZ[\⌕Z᝞“ᡃABC4“ᡃAB'ᐭ“ᡃABCDEF6d“ᡃABC“ᡃABCᩗḄ”£-✌ᐜ⌕+`ᦻZ[ᨵ¦§ṹ(ᔜ§ṹḄᱯ«஺Ꮇnp⌕ḄZ⁚ᦪ஺publicstaticvoidmain(String[]args)throwsException{Stringstr="ᡃa᰿`¯abcᡃ᰿°±def;Stringstr="ᡃABC”intnum=trimGBK(str.getBytes("GBK"),5);System.out.println(str.substring(0,num));}publicstaticinttrimGBK(byte[]bufjntn){intnum=0;booleanbChineseFirstHalf=false;for(inti=0;i

66charc=content.charAt(i);Integernum=map.get(c);if(num==null)num=1;elsenum=num+1;map.put(c,num);)for(Map.EntrySetentry:map)(system.out.println(entry.getkey()+“-”+entry.getValue());)ǸÈÉ☢ÊḄËÌᕒ⊤ÎÏÐÑ⚪ÒÓÔ-᝞F\Z[᝞"aaaabbc`Â1512”⌕ᑖÕ·¸µᦻZ[Ḅᦪ|`ᦻZ[Ḅᦪ|YᦪZZ[Ḅᦪ|ᎷZ[`Öᨵ`ᦻZ[ஹµᦻZ[ஹᦪZZ[J᜜Ḅᐸ×ᱯØZ[஺intengishCount;intchineseCount;intdigitCount;for(inti=O;i=*O'&&chv='9,)(digitCount++)elseif((ch>='a'&&chv='z')||(ch>='A'&&chv='Z))(engishCount++;)else(chineseCount++;}}System.out.println();5ஹÙÚÛÜ`⍗ᑮḄÞß᪛ᵨjavaÞß᪛áᔠ¸)*஺

67âṹ᝞1-packagecom.huawei.interview;publicclassNode{publicintvalue;publicNodeleft;publicNoderight;publicvoidstore(intvalue)(if(value

68elseif(value>this.value)if(right==null)(right=newNode();right.value=value;}else(right.store(value);)))publicbooleanfind(intvalue)(System.out.println("happen"+this.value);if(value==this.value)(returntrue;}elseif(value>this.value)(if(right==null)returnfalse;returnright.find(value);}else(if(left==null)returnfalse;returnleft.find(value);)publicvoidpreList()(System.out.print(this.value+if(left!=null)left.preList();if(right!=null)right.preList();}publicvoidmiddleList()(if(left!=null)left.preList();System,out.print(this.value+**,**);

69if(right!=null)right.preList();)publicvoidafterList()(if(left!=null)left.preList();if(right!=null)right.preList();System.out.print(this.value+}publicstaticvoidmain(String[]args)(int[]data=newint[20];for(inti=O;i

70publicNode(intvalue){this.value=value;)publicvoidadd(intvalue){if(value>this.value)(if(right!=null)right.add(value);else(Nodenode=newNode(value);right=node;))else{if(left!=null)left.add(value);else(Nodenode=newNode(value);left=node;)}}publicbooleanfind(intvalue){if(value==this.value)returntrue;elseif(value>this.value){if(right==null)returnfalse;elsereturnright.find(value);}else{if(left==null)returnfalse;elsereturnleft.find(value);)}publicvoiddisplay(){System.out.println(value);if(left!=null)left.display();if(right!=null)right.display();

71)

72/*publicIteratoriterator(){}*/publicstaticvoidmain(String[]args){int[]values=newint[8];for(intè0;iv8;i++){intnum=(int)(Math.random()*15);//System.out.println(num);//if(Arrays.binarySearch(values,num)<0)if(!contains(values,num))values[i]=num;elsei-}System.out.println(Arrays.toString(values));Noderoot=newNode(values[0]);for(inti=1;i

736ஹéyê᝞1Ḅᦻ"ᦻ5`ëdᡠᨵḄìC?ᡭᓺdí;ḄìCYí;Ḅäᦪ?ᢥí;äᦪ᣸ï-1,ðñ282,òó,353,ðñ,284,ôõ,355,ðñ286,òó,357,ö÷,288,ᵪù,35úïâṹ᝞1(£⚪⌕û.ᵨᓫýḄþÿᒹᵨ☢Ḅᙬ᝞ᑮḄ஺⌕!"#Ḅ$%)(packagecom.huawei.interview;importjava.io.BufferedReader;importjava.io.lOException;importjava.io.Inputstream;importjava.io.InputStreamReader;importjava.util.Comparator;importjava.util.HashMap;importjava.util.Iterator;importjava.util.Map;importjava.util.TreeSet;publicclassGetNameTest{/***@paramargs*/publicstaticvoidmain(String[]args){//TODOAuto-generatedmethodstub//Inputstreamips=GetNameTest.class.getResourceAsStream(7com/huawei/interview/info.txt");//ᵨ+,$%Ḅ-ṹ/0+,Ḅ-ṹ123info.txt4GetNameTest5ᙠ7+ᒹ0☢ᡠᵨ0☢Ḅ9:#;<=Mapresults=newHashMap();Inputstreamips=GetNameTest.class.getResourceAsStream("info.txr);BufferedReaderin=newBufferedReader(newInputStreamReader(ips));

74Stringline=null;try{while((line=in.readLine())!=null)(dealLine(line,results);)sortResults(results);}catch(lOExceptione){//TODOAuto-generatedcatchblocke.printStackTrace();))staticclassUser(publicStringname;publicIntegervalue;publicUser(Stringname,Integervalue)(this.name=name;this.value=value;)©Overridepublicbooleanequals(Objectobj){//TODOAuto-generatedmethodstub//0☢Ḅ-ṹ>ᨵ᡻,ABCtreesetDEᦪGHIJᵨᑮequalsKL஺booleanresult=super.equals(obj);System.out.println(result);returnresult;))privatestaticvoidsortResults(Mapresults){//TODOAuto-generatedmethodstubTreeSetsortedResults=newTreeSet(newComparator(){publicintcompare(Objecto1,Objecto2){//TODOAuto-generatedmethodstubUseruseri=(User)o1;Useruser2=(User)o2;/*᝞compareToMNO0ஹᑣQ3RS:T9UVḄ:TIEᑮWᔠDY

75*ᡠZ[\ᵨ0☢Ḅ-ṹᔲᑣ^_Sᦪ97Ḅᐸabᡭᓺeᩭ஺**///returnuseri.value-user2.value;//returnuseri.valueuser2.value)(return1;}else(returnuseri.name.compareTo(user2.name);})));Iteratoriterator=resuIts.keySet().iterator();while(iterator.hasNext())(Stringname=(String)iterator.next();Integervalue=(Integer)results.get(name);if(value>1)(sortedResults.add(newUser(name,value));})printResults(sortedResults);}privatestaticvoidprintResults(TreeSetsortedResults)(Iteratoriterator=sortedResults.iterator();while(iterator.hasNext())(Useruser=(User)iterator.next();System.out.println(user.name++user.value);))publicstaticvoiddealLine(Stringline,Mapmap)

76if(•"".equals(line.trim()))String[]results=line.split(",");if(results.length==3)(Stringname=results[1];lntegervalue=(lnteger)map.get(name);if(value==null)value=0;map.put(name,value+1);))))7ஹᑏ+SSingletoneᩭ஺i+j(⛳lm=publicclassSingleTon{privateSingleTon(){)஻!oᓄqᙠ☟᝱-ṹᙽuvwxḄ᡻,ᦔ᳛{Z|ᓰᵨ~privatefinalstaticSingleToninstance=newSingleTon();publicstaticSingleTongetlnstance(){returninstance;))ij(⛭lm=publicclassSingleTon{privateSingleTon(){}privatestaticinstance=null;//newSingleTon();publicstaticsynchronizedSingleTongetlnstance(){if(instance==null)instance=newSingleTon();returninstance;))ij(ᵨ

77publicenumSingleTon{ONE;}i(|!▭Ḅᵨ(ᙠᵨᓫo)publicclassSequenceGenerator{//0☢5ḄZ-ṹprivateintcount=0;publicsynchronizedintgetSequence(){++count;)//0☢5ᡂᓫoḄ-ṹprivateSequenceGenerator(){}privatefinalstaticinstance=newSequenceGenerator();publicstaticSingleTongetlnstance(){returninstance;))i(publicclassMemoryDao(privateHashMapmap=newHashMapOpublicvoidadd(Studentstu1){map.put(SequenceGenerator.getlnstance().getSequence(),stu1);)//MemoryDaoᡂᓫoSingletonm=⌕ᵨᙠJavaᵨwxD+S5Classᨵ+S!oᙠ஺+Singletonm=ᨵ¡jj<=(i+j<=(¢£+S5,¥Ḅ᪀⌼¨ᦪ3privateḄ■¥ᨵ+SstaticḄprivateḄ5ª,ᙠ5«¬ᓄH!o®+SpublicḄgetlnstanceKL¯°:¥

78Ḅ±ᵨ²³´ᵨᐸDḄKL஺publicclassSingleton{privateSingleton(){}//ᙠµᑁ·¢£µ+S!o¸᜻º»//$¼½private¾ᑁ·´ᵨprivatestaticSingletoninstance=newSingleton();//½u¾¿+S¾᜜·ÁÂclassḄ☟᝱KL[\ÁpublicstaticSingletongetlnstance(){returninstance;}}ij<=(publicclassSingleton{privatestaticSingletoninstance=null;publicstaticsynchronizedSingletongetlnstance(){//½SKLÃ☢ᨵᡠᦋÅᵨÆÇ1Å,Èᡂ:Ti+Ç//JᵨHÈᡂ!ov¿ᦔ᳛Éif(instance==null)instance=newSingleton();returninstance;)}ᐸa<=(¢£+S5■¥Ḅ᪀⌼¨ᦪ3privateḄᡠᨵKL3staticḄ஺+Q3i+j<=⌕|Êᐰ_8ஹ⌴ÍÎL⚪1+S᦮ᦪᜧÒ0ᵨÓÔ/Âᙢªᢥ᯿n2n4n8nḄØx⌴EÙÚᜧÒ5000HÚᢥ᯿ᢣ¢ØxÜeᩭ஺o(n=1237ᑣÜe3(12372474494898969896494824741237Ý(ᑏwxHᐜßàᢥ⌴EK=Ḅ-ṹᑏ⌴EḄáâEὃ⇋⌴å·ᑖ஺publicstaticvoiddoubleNum(intn)

79System.out.println(n);if(n<=5000)doubleNum(n*2);System.outprintln(n);Gaibaota(N)=Gaibaota(N-l)+n9ஹ⌴ÍÎL⚪2i1Sç10i2SÃi1Sçᜧ2èéÇ⌴êëᵨ⌴ÍK=ìÎei8Sçíᜧ»packagecn.itcast;importjava.util.Date;publicclassA1{publicstaticvoidmain(String[Jargs)(System.out.println(computeAge(8));)publicstaticintcomputeAge(intn)(if(n==1)return10;returncomputeAge(n-1)+2;

80)publicstaticvoidtoBinary(intn,StringBufferresult)if(n/2!=0)toBinary(n/2,result);result.append(n%2);1oஹ᣸x1ᨵï¡jKL»ëᑡ஺ᵨJAVA!+Sñò᣸x஺ÂçẆô®ᑈö᣸xஹ⌱ø᣸x/ñò᣸x0☢ñò᣸xḄ-ṹ(publicclassQuicksort{/***ñò᣸x*@paramstrDate*@paramleft*@paramright7publicvoidquickSort(String[]strDate,intleft,intright){Stringmiddle,tempDate;inti,j;ùleft;j=right;middle=strDate[(i+j)/2];do{while(strDate[i].compareTo(middle)<0&&i0&&j>left)H//úeýüÃDÚþḄᦪif(i<=j){//ÿᜧḄᦪḄᦪᣚtempDate=strDate[i];strDate[i]=strDateO]strDateO]=tempDate;i++

81)}while(i<=j);/Zὅ┯if(ileft){quickSort(strDate,left.j);))/***@paramargs7publicstaticvoidmain(String[]args){String[]strVoid=newString[]{"11","66","22',,"0H,55',,"22",,'0',,"32H};Quicksortsort=newQuickSort();sort.quickSort(strVoid,0,strVoid.length-1);for(inti=0;i

82(int)(Math.random()*1000))?@ḄAB᝞D(¥1011)->(FᓟHFIFᐗ᦮)KL஺NHḄṹDreturnsb.reverse().toString().replaceAII("H[IPQH°).replaceAII("H+SS").replaceAII("H+ᐗᐗ").replaceAII("HH")publicclassRenMingBi{/***@paramargsaddbyzxx,Nov29,20087privatestaticfinalchar[]data=newchar[]{‘H‘‘VWDX3ᾖ3Z3▮\]᳤‘)privatestaticfinalchar[]units=newchar[]{'ᐗ7IPVQSI3P3Q_’}

83publicstaticStringconvert(intmoney)StringBuffersbf=newStringBuffer();intunit=0;while(money!=0){sbf.insert(O,units[unit++]);intnumber=money%10;sbf.insert(O,data[number]);money/=10;}returnsbf.toString();})html&JavaScript&ajaxaᑖ1.ᑨdefghijeFghiᜧ᝞kᵨlmᑨdᵨᡝKᐭḄḄ;pq,'☢ḄrsB2004-11-21tu⌕wxᵨᡝḄKᐭ,ysBz{,rj᝞|ᨴ~ᜧ012..᜜ᡃ◤⌕ᵨᡝKᐭgz{Fg⌕jFgᐕᵨJAVASCRIP'஻*ᵨᑣ⊤BᑨdᑨdF'sBᯠᢥ'ᔜr;ᑁwindow.onload=function(){//ᑏ,¢£¤¥jsṹ¦htmlṹḄᑖ§ᡃ¨ᦋjsª«¬htmlṹ஺document.getElementByld("frm1").onsubmit=function(){vard1=this.dl.value;vard2=this.d2.value;if('verifyDate(d1)){alert("eFghisB")returnfalse;}if(!verifyDate(d2)){alert("efghisB");retumfalse;}if(!compareDate(d1,d2)){alert(nefghijeFhi”);returnfalse;}))functioncompareDate(d1,d2)

84vararrayDI=d1.split("-n);vardatel=newDate(arrayD1[0],arrayD1[1],arrayD1[2]);vararrayD2=d2.split("-M);vardate2=newDate(arrayD2[0],arrayD2[1],arrayD2[2]);if(date1>date2)returnfalse;returntrue;)functionverifyDate(d)(vardatePattern=/A\d{4}-(0?[1-9]|1[0-2])-(0?[1-9]|[1-2]\d|3[0-1])$/;returndatePattern.test(d);)2.ᵨtable®¯nᩩ±²³3ᣚF´µ⁐ᓽ123ᵨ¸⁐;¹456ᵨº⁐;¹7>89ᵨ¸µ⁐;¹஺12345678910window.onload=function()vartbl=document.getElementByld("tbl");

85rows=tbl.getElementsByTagName(',tr");for(i=0;i3ஹHTMLḄform¼᝞k½xᦪ¾ᦻm᪾Ḅᑁᐰa¢ᦪ;3ᔲᑣḄ¯ᵨᡝzÃ3functionchkForm(this)(varvalue=thist.dl.value;varlen=value.length;for(vari=0;i”9"||value.charAt(i)v"O"){alert("ÅᨵÆᦪ;;p”)returnfalse;)}returntrue;}4ஹᑏLᵨ0᪥½HTMLᦻm᪾=KᐭḄᑁᐰa¢ᦪ;ḄjavascriptÉÊ

86functionchkNumber(eleText)varvalue=eleText.value;varlen=value.length;for(vari=0;i"9,'||value.charAt(i)<"0H){alert("ÅᨵÆᦪ;;p)eleText.focus();break;))}◀£ᑏÌṹÍÎÏᙠÑ⚓ÓᑏL¤½ÔÕᙠṹ=Öᐭ¤¥×Øá☢âãFäåæÙÚḄÛÜÝÞÚḄßà஺5ஹ||Úᵨçèéajaxᢈë᪾ì||íîḄïðñ.Javawebaᑖ1'TomcatḄóᓄõ½DNᣵweb.xmlḄ÷øùjspúûᡂServlet஺ᨵüýᱥᳮᑁḄᜧtomcatᵨḄjvmḄᑁ2ஹHTTPḄGETPOSTḄ:servletᨵḄḄᒹ!ᓄஹ#$ᓄஹᜐᳮ'()*+,஺./ᵫjavax.servlet.Servlet12Ḅinit,servicedestroy3⊤5஺

873'789:;<=servlet;:servletᨵḄḄᒹ!ᓄஹ#$ᓄஹᜐᳮ'()*+,஺./ᵫjavax.servlet.Servlet12Ḅinit,servicedestroy3⊤5஺4ஹ>9>ServletḄ?ᕜA:servletᨵḄḄᒹ!ᓄஹ#$ᓄஹᜐᳮ'()*+,஺./ᵫjavax.servlet.Servlet12Ḅinit,servicedestroy3⊤5஺ServletB)*ᘤ!ᓄDEᘤFGᐸinit3ᑮ5JFGᐸservice3service3KLM⍧FGOPḄdoXXX3(doGetdoPost)RS)*ᘤTU!├WḄJ᎛Yᵨᐸdestroy3஺webEᘤservlet?ᕜZ$஺[\YᵨservletḄinit()3]GservletḄ#$ᓄ஺[\Yᵨservice()3^᪷`ḄabYᵨabḄdo***()3஺+,)*webEᘤYᵨservletḄdestroy()3஺5ஹServletḄcde᪀publicclassServletNameextendsHttpServlet{publicvoiddoPost(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{}publicvoiddoGet(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,lOException{}}6ஹSERVLETAPIgforward()redirect()ḄA:hὅj=EᘤgkᑴᩗḄnᔣᙠqᡝstuᘤᙢᙬxgayz{|nᔣDḄᙢᙬ}Dὅᑣ=ᐰḄntuᘤUyᑮnḄᙢᙬ〈1஺.᪵tuᘤḄᙢᙬxg'ᑮnDḄ1ᙢᙬ஺ᡠ'hὅᦔᙠhὅ'◤⌕Jᵨforward()3.᪵ᨵ◚▭Ḅ1஺ᙠᨵ:᝞◤⌕nᑮ9/ᐸ¡)*ᘤ¢Ḅ£¤ᑣ¥¦ᵨsendRedirect()3஺

887ஹ;<:YᵨdoGet()doPost()?Jsp⚓☢gḄFORM᪗ª«Ḅmethod¬ឋ®getJYᵨdoGet()®postJYᵨdoPost()஺8ஹRequestO¯Ḅ°⌕3±setAttributefStringname.Object):²³´µ®nameḄrequestḄ¶ᦪ¸getAttribute(Stringname):¹ºᵫnameᢣḄ¬ឋ¸getAttributeNames():¹ºrequestO¯ᡠᨵ¬ឋḄ´µ¼ᔠ+¾=9/¿ÀḄ!getCookies():¹ºqᡝsḄᡠᨵCookieO¯+¾=9/CookieᦪÁgetCharacterEncoding()±¹ºgḄµÂÃṹgetContentLength():¹ºḄBodyḄÅÆgetHeader(Stringname)±ÇHTTPÈÉḄᦻËᜮÍÎgetHeaders(Stringname):¹ºᢣ´µḄrequestHeaderḄᡠᨵ¸+¾=9/¿ÀḄ!getHeaderNames():¹ºᡠ'requestHeaderḄ´µ+¾=9/¿ÀḄ!getlnputStream()±¹ºḄÏᐭÑᵨÇgḄᦪ`getMethod()±Çqᡝsᔣ)*ᘤsÒ〈ᦪ`Ḅ3getParameter(Stringname):ÇqᡝsÒ〈Ó)*ᘤsḄᨵnameᢣḄ¶ᦪ¸getParameterNamesO±ÇqᡝsÒ〈Ó)*ᘤsḄᡠᨵ¶ᦪḄ´µ+¾=9/¿ÀḄ!getParametervalues(Stringname):ÇᨵnameᢣḄ¶ᦪḄᡠᨵ¸getProtocol()±ÇÔqᡝsᔣ)*ᘤsÒ〈ᦪ`ᡠÕ`ḄÈÉ´ÖgetQueryString()±Ç×صÂÙgetRequestURI()±ÇÔ|µÂÙḄqᡝsᙢᙬgetRemoteAddr():ÇÔqᡝsḄIPᙢᙬgetRemoteHost():ÇÔqᡝsḄ´µgetSession([Booleancreate]):¹ºÚᐵSessiongetServerName()±ÇÔ)*ᘤḄ´µgetServletPath():ÇÔqᡝsᡠḄÜdᦻËḄÝÞgetServerPortO±ÇÔ)*ᘤḄs2ßremoveAttribute(Stringname):1H◀gḄ9/¬ឋ9'forwardredirectḄforward=)*ᘤ£¤)*ᘤá1âãä᪗ᙢᙬḄURLURLḄåPᑁE

89æÔ\ᩭᯠDé.ᑁEêÓtuᘤtuᘤ᪷daë⍝)*ᘤ〈ḄᑁE=íîᩭḄᡠ'¡Ḅᙢᙬxgï=ðᩭḄᙢᙬ஺redirectñ=)*s᪷`òó〈9/ô᝱ṹö÷tuᘤøù/ᙢᙬ9úᩭ>tuᘤyᵨûüḄᡠᨵ¶ᦪᡠ'session,request¶ᦪý'ÇÔ஺10'request.getAttribute()request.getParameter()ᨵþA11.jspᨵíᑁ³O¯Aÿᵨᑖᑖᨵ:JSPᐳᨵ9ᑁḄrequestᵨᡝᒹᩭGET/POST"Ḅ#ᦪresponse%⚓'(ᵨᡝḄ()pageContext%⚓Ḅ*ឋᙠ-./ᳮsession1ᨵᐵḄ34applicationservlet5ᙠ᡻7Ḅᑁ8outᵨᩭ'〈()Ḅ:;configservletḄ᪀=>?pageJSP%⚓@Aexception┐┯D%⚓EᣓᣍḄH᜜request⊤KHttpServletRequest஺MᒹNᨵᐵOPᘤḄRSTUVWNXᵨYZ[cookie,header,\sessionᦪ]ḄᨵᵨḄ஺response⊤KHttpServletResponseTVWNXᵨY^〈(OPᘤḄ_)Ḅ(᝞cookies,ᜮRSc)outjavax.jsp.JspWriterḄefHTVWNXghiᵨYᔣOPᘤ(〈:;kl஺pageContext⊤Kejavax.servlet.jsp.PageContext஺MᵨYmn[ᔜprḄstuvஹservletxᐵḄḄAPITUᒹyNzᵨḄservletxᐵ{iḄ஺session⊤KeḄjavax.servlet.http.HttpSession஺Session|n}ᵨᡝḄ~᝱RSapplicator)⊤Kejavax.servle.ServletContext஺-ᨵYᨵᐵservlet\servlet᛻ḄRSconfig⊤Kejavax.servlet.ServletConfig஺ᵨYn[servletfHḄᓄ#ᦪ஺page⊤K⚓☢ḄeservletfH

9012.jspᨵᵨᑖ-⚪⌕ᨵ⚪:JSPᐳᨵ6p@jsp:includeᙠ⚓☢¡Ḅ¢᎛ᐭeᦻ?஺jsp:useBean:¦ᡈὅfHᓄeJavaBean஺jsp:setProperty:^JavaBeanḄ*ឋ஺jsp:getProperty::;©JavaBeanḄ*ឋ஺jsp:forward:ª«ᑮeḄ⚓☢஺jsp:plugin᪷]OPᘤ¯°Java±?ᡂOBJECT^EMBE³´13ஹJSPḄµᵨᢣ·isErrorPageᔲigᵨExceptionisELIgnoredᔲ¹ᶍ⊤»¼14.JSP½᝱INCLUDE1☟᝱INCLUDEḄ¿᝱INCLUDEᵨjsp:includefÀMÃÄᡠᦻ?½ḄÆᓄ〉ᔠᵨYᒹ᝱⚓☢TU|É#ᦪ☟᝱INCLUDEᵨincludeÊṹfÀÌÄᡠᦻ?ḄÆᓄ〉ᵨYᒹ☟᝱⚓☢<%@includefile=included.htm%>15ஹÍpΫ¼ᑖᨵ¿☢Ḅ(Ï┯D)Ðforward\sendRedirectḄ¿ÑÒ;⚪ḄÓÔÕÖᦻt×ØḄÓ|i⊤»iÙTÚÛÜÝᵨÞeÌßàáâᐸAḄᢈØ☢å|inᙠe⚪eÌæ5çèḄéê⊤»"ëNÏìéêíᩭîe⚪ï|i᪷@ðñÓiᡠ⚪¢⌕òóôõ⌕ªö÷⍝Ḅ⊤»"ëðùNú⌕ûü᦬þ⚪ïḄᐹ⌕ᕡḼᙠ⚪ᨵᑖὅ⚓☢ᔣincludeᡠᢣḄ⚓☢"#$%⚓Ḅ&'(⚓☢)*ᩭḄ⚓☢஺᡻/01)2ᩭ3456ᦪ8ᵨ஺:;<=>?ᦪ.1ὅ0ᐰᔣB⚓☢C2ᩭ஺345gotoDE஺

9116ஹ⚓☢GHIJ⌴ḄLMrequestsessionapplicationcookieN17ஹJSPOServletᨵPQ3RSORSTUVGḄὶXYJSPServletᢈ[Ḅ᡽]^_`ServletḄa᧕Lcde8fᵨḄ᜜⊤⊤i஺JSPjk1"mservlet"஺ServletOJSPᨬ(⌕ḄRSᙠ5ServletḄfᵨopᙠJavaᦻrs:;0ᐰt⊤$usḄHTMLvᑖwxᩭ஺yJSPḄz{JavaOHTML<=|ᔠᡂ᡽].jspḄᦻr஺JSP5Servlet(⌕ᵨ5ᑴop஺18ஹMVCḄᔜᑖᨵQᢈ[ᩭY᝞Y:MVCModel-View-ControllerḄaᑏ஺Model⊤ḄfᵨḄop(JavaBeanEJB|r)ViewfᵨḄ⊤$☢(ᵫJSP⚓☢)“ControllerfᵨḄᜐᳮᑴ(Servlet)¡¢£¤¥¦fᵨopᜐᳮO#$opᑖᡂRḄ|r஺¡Q|r<=§/¨©Oᵨ஺19ஹᡃUᙠwebfᵨx«s¬⍗ᑮ°±²jṹḄ´µ᝞iso8859-1N᝞°±²jṹḄ´µ¶YPublicStringtranslate(Stringstr){StringtempStr=try(tempStr=newString(str.getBytes("ISO-8859-1"),f,GBK");tempStr=tempStr.trim();)catch(Exceptione){System.err.println(e.getMessage());)returntempStr;)

9220•ᙠ°ᐭnᦪ´=⌹¹ᑖxºᯠ1<⌱½ᓣᡈὅÀÁ᣸Áºᢥ¨ÄÅᙠÆ⚓☢#$ᢥ᣸Á&'resetÇ.ᦪÈÉᑖ1'ᵨLc᪷È̹tÍᑮÎÏÐtÎᑮÍᑡ±ÒᕒÏḄÔÕ஺employee:eid,ename,salary,deptid;select*fromemployeeorderbydeptiddesc,salary2ஹᑡ±ᔜÌsÏÐÍ5^ÌḄÖᙳÏÐḄᕒÏᦪO̹:ᢥ̹᣸ÁØÙ⊤mysql>createtableemployee921(idintprimarykeyautojncrement,namevarchar(50),salarybigint,deptidint);ÚᐭÛᦪÈmysql>insertintoemployee921values(null,'zs',1000,1),(null,'Is',1100,1),(null,'ww',1100,1),(null,'zl',900,1)000,2),(null,1zl1,900,2),(nullºzI',1000,2),(null/zPJ100,2);jᑏsqlDE()selectavg(salary)fromemployee921groupbydeptid;()mysql>selectemployee921.id,employee921.name,employee921.salary,employee921,deptidtidfromemployee921wheresalary>(selectavg(salary)fromemployee921wheredeptid=tid);ᦔ᳛ÎḄDE,ßàá?ὃãᵨ(ᙠgroupbyV1äãᵨwhere«"äãᵨhavingᙠgroupbyV<=ãᵨwhereᓽ⊤$Hæ1Ḅ&'ᑖ|)

93mysql>selectemployee921.id,employee921.name,employee921.salary,employee921.deptidtidfromemployee921wheresalary>(selectavg(salary)fromemployee921groupbydeptidhavingdeptid=tid);()selectcount(*),tidfrom(selectemployee921.id,employee921.name,employee921.salary,employee921.deptidtidfromemployee921wheresalary>(selectavg(salary)fromemployee921wheredeptid=tid))astgroupbytid;Æ᜜Lcᐵὶèéselecta.ename,a.salary,a.deptidfromempa,(selectdeptd,avg(salary)avgsalfromempgroupbydeptid)bwherea.deptid=b.deptidanda.salary>b.avgsal;3ஹêëìí«ᘤïðñ¬ò☢óᑮcreateprocedureinsert_Student(_namevarchar(50),_ageint,outJdint)begininsertintostudentvalue(null,_name,_age);selectmax(stuld)intoJdfromstudent;end;callinsert_Student('wfz\23,@id);select@id;mysql>createtriggerupdate_StudentBEFOREupdateonstudentFOREACHROW->select*fromstudent;í«ᘤᐕõö2&'createtriggerupdate_StudentBEFOREupdateonstudentFOREACHROWinsertintostudentvalue(null,'zxx\28);mysqlḄí«ᘤ÷äH4⊤§/øùcreatetriggerupdate_StudentBEFOREupdateonstudentFOREACHROWdeletefromarticleswhereid=8;¡úûüýᨬýᵨᑤ◀ᵨᡝᑤ◀ᵨᡝḄᡠᨵ⌕ᵨOLD.idᘤᵨᜐḄ᝞᪥ᑁ"ஹ$%"ஹFacebook&'()*+,

94./ᐸ12ᙠ45'(678ᔣ+,⊤;ᑏᐭᩩ?஺ABᘤᦔ᳛E஺FUCHGᨵᵨᘤᦔ᳛HᦪJᜐᳮLMNO஺PQRSḄ1TUVWmysql>delimiter|mysql>createprocedureinsertArticle_Procedure(pTitlevarchar(50),pBidint.outpldint)->begin->insertintoarticlelvalue(null,pTitle,pBid);->selectmax(id)intopldfromarticlel;->end;->IQueryOK,0rowsaffected(0.05sec)mysql>callinsertArticle_Procedure('XYZ[',1,@pid);->IQueryOK,0rowsaffected(0.00sec)mysql>delimiter;mysql>select@pid;+------+I@pid|+------+|3|+.......+1rowinset(0.00sec)mysql>select*fromarticlel;+--+................+.......+|id|title|bid|+--+................+------+I1Itest|1||2|chuanzhiboke|1|I3|XYZ[|1|+--+.................+.......+3rowsinset(0.00sec)ᘤḄ1TUVWcreatetableboard1(idintprimarykeyauto_increment,namevarchar(50),articleCountint);createtablearticlel(idintprimarykeyautojncrement,titlevarchar(50),bidintreferencesboardl(id));

95delimiter|createtriggerinsertArticle_Triggerafterinsertonarticlelforeachrowbegin->updateboard1setarticleCount=articleCount+1whereid=NEW.bid;->end;->Idelimiter;insertintoboard1valuenull,'test',0;insertintoarticlelvaluenull,'test',1;ᨵ\]ᐭN^_`᱐☢⊤;Ḅᨬ7deᦪfghijUklᵨᘤ6ᦔ᳛2E஺mnopq᪵ᫀtᑏᘤuvᨬ7dwL◤⌕ᵨdeclareyz{|}~,ᡈὅᵨNEW.posttimeᩭᡂ஺4ஹᦪJzz1NFWfgᐹᨵឋw8ᑖ஺ᡠᨵᐵᦪJNzᦪJ⊤;ḄfgNᓫឋḄw8ᑖ஺t᝞fgᐸ;ḄHB᦮¢£¤¥ᑖ¦§ᑖ¦§ᑖ᝞¨⌕¥ᑖ©Hpqᡂª«¬Ḅfg஺z2NFWz2NFᙠz1NFḄ®Ạ°±¬²ᩭḄᓽz2NFᐜz1NF஺⌕µᦪJ⊤;Ḅ\1tᡈiw¶·¸ᙢ¥ᑖ஺+º◤⌕B⊤5°ᑡ¶PQᔜ1tḄ¸᪗¾஺¸ឋᑡ·¿BÀᐵÁfᡈÀÁ஺z2NF⌕µ1¢ḄឋÂᐰÄÅvÀᐵÁf஺ᡠÆÂᐰÄÅᢣLPᙠÈÄÅÀᐵÁf§ᑖḄឋ᝞¨PᙠÉឋHÀᐵÁfḄ§ᑖÊᑖË©ᩭÌᡂlḄ1¢l1¢Í1¢ÎduḄᐵ஺B1Ï¥ᑖ+º◤⌕B⊤5°ᑡ¶PQᔜ1tḄ¸᪗¾஺ÐFÑÎz2ÒÀឋÒ§ᑖÄÅvÀᐵÁf஺zḄ⌕µ᝞mWz3NFᐜz2NF஺ÐFÑÎz3NF⌕µᦪJ⊤;ᒹÔÕᙠᐸÖ⊤;ÕᒹÔḄÒÀᐵÁf×Ø஺ᡠ¶zᐹᨵ᝞mᱯÚW1,\ᑡÛᨵÜ

962\iNL¥ᑖ஺3\⊤NᒹÔᐸÝ⊤ÕÞᒹÔḄÒÀᐵÁf×Ø஺t᝞⊤;ÛL©ÏßḄidFL©ÏßḄidj©ÏßᔲᑣÛ⌕©ÏjßidḄᡠᨵâãÖä;Ḅ§ᑖNåæçᢝé2ᦪJᑍë஺5ஹì©íᦪJîᓄy☢ḄÞTᵨPreparedStatementðᩭìStatementឋLEWsqlñòóᘤô᡻iö÷UVWø¤ùúஹøûᑖ᪆ýþÿ*1nertintouservalues(1,1,1)"-ᑴ,'inertintouservalues(2,2,2)"-ᑴ"inertintouservalues(?,?,?)"-ᑴᨵ᜜ᐭᑤ◀ឋ᝞ᦪḄ᦮ឋ!ᙠ#$ᦪ%&'(ᣵ᜜஺(,-.'/,0123'45678ᦔ᳛ᐙᑖ=>23Ḅᑴ⌼ᖪ)(BChibernateᩭE>'GHᨵIJKᓄ.empleyee->DeptmentBMNᙠ#$&'ᡂ6employeedeptid)PmysqlQRᦻ᫏UVWX⁚Ḅᨬ[\ᑖ]᝞᪷_`Ḅaᳮc☢ḄUVWef⌕,hᩩᐵὶVWḄᦔ᳛8.1.selecte.name.e.salarywheree.managerid=(selectidfromemployeewherename='zxx');2.selecte.name,e.salary,m.name,m.salaryfromemployeese,employeesmwheree.managerid=m.idandm.name='zxx';⊤mᐕo〉qᑍst᝞u⚪wḄxyᦪzᨬ[xy&{|}~ṹᓫᵨᡝ⊤mᩭ஺4/ḄIBIḄᫀ]sqlefᐰ\ᜧᑏᱯ4ᑡ⊤ᜧᑏ஺ᱯ4sqlḄ◤⌕Iᜧᑏsqlef¡¢஺racle£¤ᘤe¦1V§¨ᡂ5ᑁ\ᢣ᡻¬ᢣ஺᪷Ḅᱯ®⌕¯°ᩩ±²4ᵨ³PreparedStatment´ᨵµ¶BVWឋḄᦋ¸4¹ºᐵ»Ḅ஺

97ᜓ».c☢4ᐵCឋḄ½¾¿]4ÀÁ3JÂÃm*nselect*fromflight,citywhereflight.startcityid=city.cityidandcity.name^beijing1;m+nselect*fromflightwherestartcityid=(selectcityidfromcitywherecityname='beijing,)Äselectflight.id,Beijing',flight.flightTimefromflightwherestartcityid=(selectcityidfromcitywherecityname='beijing')6'unionunionallᨵBC5D³Ꮇ#ᡃÇᨵIJ⊤StudentᒹÉcÊËÌᦪ.droptablestudent;createtablestudent(idintprimarykey,namenvarchar2(50)notnull,scorenumbernotnull)Äinsertintostudentvalues(1,'Aaron1,78);insertintostudentvalues®,'Bill',76);insertintostudentvalues(3,'Cindy1,89);insertintostudentvalues(4,'Damon',90);insertintostudentvalues(5,'Ella\73);insertintostudentvalues(6,'Frado\61);insertintostudentvalues(7,'Giir,99);insertintostudentvalues(8,'Hellen',56);insertintostudentvalues(9,'lvan,,93);insertintostudentvalues(10ÄJay,,90);commit;UnionUnionAllḄÍÎ஺select*fromstudentwhereid<4union

98select*fromstudentwhereid>2andid<6Ï}41Aaron782Bill763Cindy894Damon905Ðla73᝞ᣚᡂUnionAllÒÓÔJÏÕᑣ×xÏ4.1Aaron782Bill763Cindy893Cindy894Damon905Ðᓃ73PᑮUnionUnionAllḄÍÚIᙠCBÛyÏḄᜐᳮ஺UNIONᙠ¬⊤ÝÓ[Þ⌱ᣵÛyḄàáᡠᙠ⊤ÝÓ[Bᡠ2ãḄÏÕ¬᣸åæᑤ◀ÛyḄàáç×xÏ஺è▭ᜧ\ᑖGᵨm4®2ãÛyḄàáᨬêḄ4ë⊤Ìᔊí⊤UNION஺᝞.select*fromgc_dfysunionselect*fromlsjg_dfysJSQLᙠå¬&ᐜïÔJ⊤ḄÏçᵨ᣸ð{¬᣸ᑤ◀ÛyḄàáᨬ[×xÏÕ᝞⊤ᦪzᜧḄñòóᵨôõ¬᣸஺²UNIONALLö4÷ᓫḄ}ÔJÏᔠù['×x஺᪵᝞×xḄÔJÏÕmᨵÛyḄᦪ!û×xḄÏÕ'ᒹüÛyḄᦪ6஺ᦔ᳛ýEUNIONALL⌕,UNIONþÿᡠ᝞ᔠḄᒹḄᦪḄᵨUNIONALL

997.ᑖ⚓!"#$sql⊤&31ᑮ40Ḅ()(+,-.ID/01)sqlserver3ᫀ1:selecttop10*fromtwhereidnotin(selecttop30idfromtorderbyid)ordebyidsqlserver3ᫀ25selecttop10*fromtwhereidin(selecttop40idfromtorderbyid)orderbyiddescmysql3ᫀ5select*fromtorderbyidlimit30,10oracle3ᫀ5select*from(selectrownumr,*fromtwherer<=40)wherer>306᦮ᳮ9:Ḅᑁ<............................pageSize=20;pageNo=5;1.ᑖ⚓ᢈ?1(@Aᑭᵨsql!"9Cᑖ⚓ᦔ᳛ᨬGHᨬI₞Ḅ)mysqksql="select*fromarticleslimit"+(pageNo-1)*pageSize++pageSize;oracle:sql="select*from"+"(selectrownumr,*from"+"(select*fromarticlesorderbypostimedesc)"+"whererownum<="+pageNo*pageSize+")tmp"+"wherer>"+(pageNo-1)*pageSize;KL5&7CMNrownumḄOPQRḄS/oracleḄTUV⌼ᡂrownumYZ[Ḅ\]^_`5aᨵorderbycrownumᢥOPe$fgᨵhorderbyrownumᢥOPe$hijkrownumQ᣸PmḄno஺᝞qorderbyr"ḄstuvhTUrownumwQᢥOPe$ḄS/ic᎛yᡂz{Ḅ|}cV~᯿TU⊤ḄOPᩭ᪀u஺sqlserver:sql="selecttop10*fromidnotid(selecttop"+(pageNo-1)*pageSize+"idfromarticles)'1DataSourceds=newlnitialContext().lookup(jndiurl);Connectioncn=ds.getConnection();//"select*fromuserwhereid=?”—>binarydirectivePreparedStatementpstmt=cn.prepareSatement(sql);ResultSetrs=pstmt.executeQuery()while(rs.next())

100out.println(rs.getString(1));)2.,Ḅ᪗pageSize=20;pageNo=5;cn=nullstmt=null;rs=null;try{sqlservesql="select*fromarticles'*;DataSourceds=newlnitialContext().lookup(jndiurl);Connectioncn=ds.getConnection();//''select*fromuserwhereid=?"—>binarydirectivePreparedStatementpstmt=cn.prepareSatement(sql);ResultSetrs=pstmt.executeQuery()for(intj=0;j<(pageNo-1)*pageSize;j++)(rs.next();)inti=0;while(rs.next()&&i<10){i++out.println(rs.getString(1));))cacth(){}finnaly{if(rs!=null)try{rs.close();}catch(Exceptione){}if(stm........if(cn............)3.,Ḅ᪗pageSize=20;pageNo=5;cn=null

101stmt=null;rs=null;try(sqlserver:sql="select*fromarticles'1;DataSourceds=newlnitialContext().lookupQndiurl);Connectioncn=ds.getConnection();//1'select*fromuserwhereid=?H->binarydirectivePreparedStatementpstmtcn.prepareSatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,...);//᪷☢iCṹḄSQLFeatureNotSupportedExceptionᑨ,Qᔲᢝ,᪗ResultSetrs=pstmt.executeQuery()rs.absolute((pageNo-1)*pageSize)inti=0;while(rs.next()&&i<10){i++out.println(rs.getString(1));))cacth(){}finnaly{if(rs!=null)try{rs.close();}catch(Exceptione){}if(stm........if(cn...........)8.ᵨfᩩSQL!"|}$ᜧ80ᑖḄynamekechengfenshu!ᦻ81ᦪ75¢£!ᦻ76¢£ᦪ90

102¤¥!ᦻ81¤¥ᦪ100¤¥¦!90§ᜓᦪḄsqlṹ5createtablescore(idintprimarykeyauto_increment,namevarchar(20),subjectvarchar(20),scoreint);insertintoscorevalues(null,,!ᦻ,,81),(null©'ᦪ',75),(null¢£!ᦻ,,76),(null¢£ᦪ,,90),(null¤¥«!ᦻ,,81),(null¤¥Vᦪ,,100)(null¤¥«¦!',90);_`5¬®¯ᐸ±c²ᳮ³®´µ¶·ᡂᜧ¸µᜧ·ᡂ¶¸¹ᫀ5A:selectdistinctnamefromscorewherenamenotin(selectdistinctnamefromscorewherescore<=80)B:selectdistincenamet1fromscorewhere80

103ÎyÏGḄÐÑ஺²KÔ5TestDBᨵÕÐÑᨵ1-12ᨴÍḄÎyÏ஺AccID:ÐÑṹOccmonth:ÎyÏᨴÍDebitOccur5ÎyÏ஺ᦪ×5JcyAuditᦪ:Select*fromTestDB§ᜓᦪḄsqlṹ5droptableifexistsTestDB;createtableTestDB(idintprimarykeyautojncrement,AccIDvarchar(20),Occmonthdate,DebitOccurbigint);insertintoTestDBvalues(null,988-1-1',100),(null,'101','1988-2-V,110),(null,"01','1988-3-1',120),(null,,101V1988-4-1\100),(null,'101','1988-5-1',100),(null101'1988-6-1\100),(null,'101',,1988-7-1\100),(null101'1988-8-1\100);fᑴ☢ḄᦪᦑÔµ&fᨴÍḄÎyÏᦪsᦋ¶fÛinsertintoTestDBvalues(null,”021988-1-1',90),(null,,102,1988-2-1,,110),(null,,102,1988-3-1\120),(null102\,1988-4-1\100),(null,'102',,1988-5-1,,100),(null102'1988-6-1\100),(null10271988-7-1,,100),(null,”0271988-8-1',100);--ᑴᨬ☢ḄᦪᦑÔµᡠᨵÎyÏᦪsᦋᜧfÛinsertintoTestDBvalues(null103'1988-1-1\150),(null,'103','198821',160),(null,303?1988-3-1',180),(null,,1037198841',120),(null103'1988-5-1\120),(null/WS'.'l988-6-1\120),(null,”0371988-7-1',120),(null103'1988-8-1\120);-ᑴᨬ☢ḄᦪᦑÔµᡠᨵÎyÏᦪsᦋᜧfÛinsertintoTestDBvalues(null/W^/l988-1-V,130),(null104','1988-2-1\130),(null,'104','1988-3-1',140),(null,”0471988-4-T,150),(null/IO^J988-5-1,,160),(null,"04','198861',170),

104(null,'104',,1988-7-V,180),(null,”0471988-8-1',140);-ᑴᨬ☢ḄᦪᦑÔµ&©ᨴÍḄÎyÏᦪsᦋ¶fÛinsertintoTestDBvalues(null/WS';l988-1-V,100),(null.'IOS'/l988-2-1,,80),(null/IOS';l988-3-V,120),(null105'/1988-4-1\100),(null105\,1988-5-V,100),(null,"O5','1988-6-1',100),(null10571988-7-1\100),(null,'105','1988-8-1\100);¹ᫀ5selectdistinctAccIDfromTestDBwhereAccIDnotin(selectTestDB.AcclDfromTestDB,(select*fromTestDBwhereAcclD=*101')asdb101whereTestDB.Occmonth=db101.OccmonthandTestDB.DebitOccur<=db101.DebitOccur)11.ÝÞßᨴḄàáyearmonthamount199111.1199121.2199131.3199141.4199212.1199222.2199232.3199242.4|ᡂi᪵fyearmlm2m3m4

10519911.11.21.31.419922.12.22.32.4_`5iãäåᩩæçèãyḄÐÑᡂéwÕÓè஺§ᜓsql!"5droptableifexistssales;createtablesales(idintautojncrementprimarykey,yearvarchar(10),monthvarchar(10),amountfloat(2,1));insertintosalesvalues(null,”997,T,1.1),(null,”991',2,1.2),(null,”991',3,1.3),(null,”991',4,1.4),(null,”9921T,2.1),(null,,1992,2,,2.2),(null,”99213,2.3),(null,”992,4,2.4);¹ᫀfஹselectsales.year,(selectt.amountfromsalestwheret.month='1'andt.year=sales.year)'1',(selectt.amountfromsalestwheret.month='1'andt.year=sales.year)'2',(selectt.amountfromsalestwheret.month=Tandt.year=sales.year)'3',(selectt.amountfromsalestwheret.month='1'andt.year=sales.year)as'4'fromsalesgroupbyyear;12.Ê`ᦻë᪗⚪ÎíîஹᨬïZc¼⊤5id,title,postuser,postdate,parentid§ᜓsql!"5droptableifexistsarticles;createtablearticles(idintautojncrementprimarykey,titlevarchar(50),postuservarchar(10),postdatedatetime,parentidintreferencesarticles(id));insertintoarticlesvalues(null&fᩩ998-10-1012:32:32,,null),(null&©ᩩð998-10-1012:34:321,null),(null&fᩩZ17¢£','1998-10-1012:35:32,1),(null/&©ᩩZ1¢£','1998-10-1012:36:32;2),(null,,&fᩩZ27¤¥','1998-10-1012:37:32',1),(null&fᩩZ37¢£'1998-10-1012:38:32,,1),(null&©ᩩZ2?¢£','1998-10-1012:39:32,2),(null&fᩩZ41¤¥','1998-10-1012:39:40',1);

106¹ᫀ5selecta.title,a.postuser,(selectmax(postdate)fromarticleswhereparentid=a.id)replyfromarticlesawherea.parentidisnull;KL5ñ|}ᵨᙠ⌱óᑡwᵨwhereḄ½õᩩö÷ᵨfromr"஺13.ᑤ◀◀id5D9ᐸHIDḄJKᑍMN2.y⊤᝞ø5idooùnoùúᑖᦪ120050010001ᦪ6922005002¢£0001ᦪ89320050010001ᦪ69A:deletefromtablenamewhereidonotin(selectmin(ido)fromtablenamegroupbyoùnoùúᑖᦪ)Òû5createtablestudent2(idintautojncrementprimarykey,codevarchar(20),namevarchar(20));insertintostudent2values(null,'2005001','f),(null,,2005002'¢£'),(null,'2005001'')஻᝞ø!"mysqlýþ┯ᑤ◀☢ᑤ◀஺deletefromstudent2whereidnotin(selectmin(id)fromstudent2groupbyname);஻᝞ᨵ⚪select*fromstudent2whereidnotin(selectmin(id)fromstudent2groupbyname);//"ᡃ$ᐜ&ᑖ(Ḅ*ᡂ,⊤ᯠ0,⊤1⌱3ᨬ5678ᑤ◀Ḅᩩ:ᦪ<஺deletefromstudent2whereidnotin(selectmidfrom(selectmin(id)midfromstudent2groupbyname)ast);ᡈὅdeletefromstudent2whereidnotin(selectmin(id)from(select*fromstudent2)astgroupbyt.name);

10714.?@AḄBC?DEF⚪⊤᪀᝞flight{flightlD,StartCitylD,endCitylD,StartTime}city{citylD,CityName)HIJ᛻createtablecity(citylDintautojncrementprimarykey,cityNamevarchar(20));createtableflight(flightIDintautojncrementprimarykey,StartCityIDintreferencescity(citylD),endCitylDintreferencescity(citylD),StartTimetimestamp);஻?DLᩭNOᨵPQRᑖST☢Ḅ⚪UV1WXᑮZPQinsertintocityvalues(null,'ᓅ\]^_`')cinsertintoflightvalues(null,1,2,'9:37:23'),(null,1,3,'9:37:23'),(null,1,2,90:37:23'),(null,2,3c10:37:23');1ஹEFefghᓅ\Ḅᡠᨵ?DᢥᑮkghḄlm᣸opqrsḄᑡᡃeṹvwx3ᩭḄyzᑡᨬ{ᡃ|&}~wx3ᩭ஺ᔜC⊤(ᔠ3ᩭḄ1m1ᒹᡠᨵrsḄm஺select*fromflightf,citycwheref.endcityid=c.cityidandstartcityid=(selectc1.cityidfromcityc1whered.cityname="4ᓃ\")orderbyc.citynameasc;mysql>selectflight.flightid,'Jᓃ\'startcity,e.citynamefromflight,cityewhereflight.endcityid=e.cityidandflight.startcityid=(selectcityidfromcitywherecityname='ᓃ\');mysql>selectflight.flightid,s.cityname,e.citynamefromflight,citys,cityewhereflight.startcityid=s.cityidands.cityname=4ᓃ\'andflight.endCityld=e.cityIDorderbye.cityNamedesc;2ஹEFᓅ\ᑮ]^Ḅᡠᨵ?D(efghᑮkghef?D)selectc1.CityName,c2.CityName,f.StartTime.f.flightIDfromcityc1,cityc2,flightfwheref.StartCitylD=c1.citylDandf.endCitylD=c2.citylD

108andc1.cityName=!ᓃ\'andc2.cityName=']^'3ஹEFᐹᜩ(2005-5-8)Ḅᓅ\ᑮ]^ḄḄ?Dᦪselectcount(*)from(selectc1.CityName,c2.CityName,f.StartTime,f.flightlDfromcityc1,cityc2,flightfwheref.StartCitylD=c1.citylDandf.endCitylD=c2.citylDandc1.cityName='dᓃ\'andc2.cityName=']^'andEḄCPQᜐᳮᦪ(startTime)like2005-5-8%'mysql1PQRᑖ¡¢Ḅx£¤ṹ᝞select*fromflightwheredate_format(starttimec%Y-%m-%d,)=1998-01-02'15.E3¡¥ᳮ¦§¨©Ḅᕒ«¬Droptableifnotexistsemployees;createtableemployees(idintprimarykeyautojncrement,namevarchar(50),salaryint,manageridintreferencesemployees(id));insertintoemployeesvalues(nullclhm\10000,null),(nullczxx\15000,1),(null,'fix',9000,IJXnull.'tg',10000,2),(null,'wzg',10000,3);Wzgᜧ"flxjhmᜧ"zxx¯⚪°±᪷m.salary;16ஹÏ3Ð"45ÑḄᔜCὁÓᡠÔḄᜧ"12ÑḄÕÖ×ᦪᦪ<Ø1ᨵ3C⊤teacher⊤»student⊤»tea_stuᐵÚ⊤஺teacher⊤tealDnameagestudent⊤stulDnameageteacher_student⊤tealDstulD⌕ÏᵨᩩsqlEF3»᪵Ḅ1.wxḄm⌕ᨵὁÓname,ageÝCὁÓᡠÔḄÕÖ×ᦪ

1092Þᑡ3ὁÓage840ßÕÖage812ß]Ḅ¹⚜ᜓâãi.sqläÝᩩ¹ᜐᳮᩩ:8åᑣ᡻è7(select,insert,delete,update)2.Þ⌕ÅᓱÇÈéÉêÖ“ᚗÍ”¬ᡠß•Þ⌕ÅᓱÇÈZᡃ~✌ᐜé⌕$ᑮî◀“ᚗÍ”¬HIïᜓdroptableifexiststea_stu;droptableifexiststeacher;droptableifexistsstudent;createtableteacher(tealDintprimarykeynamevarchar(50),ageint);createtablestudent(stulDintprimarykeynamevarchar(50),ageint);createtabletea_stu(tealDintreferencesteacher(tealD),stulDintreferencesstudent(stulD));insertintoteachervalues(1,'zxx',45),(2clhm',25),(3,'wzg',26),(4,'tg',27);insertintostudentvalues(1,'wy',11),(2,'dh',25),(3,'ysq',26),(4,'mxc',27);insertintotea_stuvalues(1,1),(1,2),(1,3);insertintotea_stuvalues(2,2),(2,3),(2,4);insertintotea_stuvalues(3,3),(3,4),(3,1);insertintotea_stuvalues(4,4),(4,1),(4,2),(4,3);23,32,43¯⚪°±(åH☢ðñ⚪ò⌕ᑏ3ÝCᑖ᪆õö᝞÷øvéùú×⌕)1⌕Éᑖ(¬¬ûᙠ1⊤1selectteaid,count(*)fromtea_stugroupbyteaid;2ýḼᐸ◀ᣵ12Ḅᯠ⊤studentᐵὶᑮ12!"#$%&'⊤ᒆ◀)ṹ+selecttea_stu.teaid,count(*)totalfromstudent,tea_stuwherestudent.stuid=tea_stu.stuidandstudent.age>12groupbytea_stu.teaid3.-Ḽ$/☢Ḅ123ᡂ5⊤teacherᐵὶ6◀ᜧ45Ḅὁ9selectteacher.teaid,teacher.name,totalfromteacher,(selecttea_stu.teaid,count(*)totalfromstudent,tea_stuwherestudent.stuid=tea_stu.stuidandstudent.age>12groupbytea_stu.teaid)astea_stu2whereteacher.teaid=tea_stu2.teaidandteacher.age<45;17.OPQRᨬTḄUVselectauthorid,count(*)totalfromarticlesgroupbyauthoridhavingtotal=(selectmax(tota!2)from(selectcount(*)total2fromarticlesgroupbyauthorid)ast);

110selectt.authorid,max(t.total)from(selectauthorid,count(*)totalfromarticles)ast;ᩩ=>?@AmaxBᨵDᑡ?ᐸGᑡHI஺selectauthorid,count(*)totalfromarticlesgroupbyauthoridhavingtotal=max(total)K?஺18ஹDMᵨᡝ⊤ᨵDMPᑖRSᎷ᝞ᦪWXᨵ100YZMᵨᡝ[⌕ᙠ^_`DᜩbᨌdPᑖefgdὃ⇋jkgdljkmnopqaltertabledropcolumnscore;altertableaddcolunmscoreint;rstuv◤⌕xyxy?z{Ḅ|᛻ᩭᑐ6⌕;᪵ḄnḄᙠᡃḄᓺBᨵinertupdatedeleteDML=>createtable,droptable,altertableDDL=>?஺opᫀDupdateusersetscore=0;opᫀᎷ/☢Ḅ)ṹ⌕᡻ᡃḄᡃaltertableuserdropcolumnscore;altertableuseraddcolumnscoreint஺"☢)ṹ^_ḄMbᨌef஺Runnablerunnable=newRunnable(){publicvoidrun(){clearDb();schedule(this,newDate(newDate().getYear()+1,0,0));)}¡schedule(runnable,newDate(newDate().getYear()+1,0,1));

11119ஹDMᵨᡝᐹᨵYM£⁐¥¦§⊤ᐹᨵᵨᡝḄᡠᨵ£⁐ḄᐸGᵨᡝ஺selectcount(*)asnum,tb.idfromtb,(selectrolefromtbwhereid=xxx)ast1wheretb.role=tl.roleandtb.id!=t1.idgroupbytb.idhavingnum=selectcount(role)fromtbwhereid=xxx;20.xxx©ªḄsql☢xTableEMPLOYEESStructure:EMPLOYEEJDNUMBERPrimaryKey,FIRST.NAMEVARCHAR2(25),LAST_NAMEVARCHAR2(25),Salarynumber(8,2),HiredDateDATE,Departmentidnumber(2)TableDepartmentsStructure:Departmentidnumber(2)PrimaryKey,DepartmentNameVARCHAR2(25).(2)«/¬EMPLOYEE⌕ᑏ¦§+ᑏ®ᵨ¯°ᙠ±_Ḅᡈὅ´µᙠ[1000,2000]¶Ḅᡈὅᕒ´¸¹(last_name)!‘ObamaᡭᜮḄᡠᨵᕒ´ᑡ;¾ᕒ´ḄᐰÀMÁÂÃ஺(4ᑖ)select*fromemployeeswhereYear(hiredDate)=Year(date())or(salarybetween1000and200)orleft(last_name,3)=,abc';(3)«/¬EMPLOYEESᑏ¦§+¦ÀÅÆᙳ´µᜧ1800ᐗḄÀÅḄᡠᨵᕒ´ᑡ;¾ᕒ´ḄᐰÀMÁÂÃ஺(4ᑖ)mysql>selectid,name,salary,deptiddidfromemployeelwhere(selectavg(salary)fromemployeelwheredeptid=did)>1800;(4)«/¬EMPLOYEEnᑏ¦§+¦MÁ´µÉᐸᡠᙠÀÅÆᙳ´µḄᕒ´ஹᑡ;¾ᕒ´ḄᐰÀMÁÂÃÊᕒ´´µÉÀÅÆᙳ´µËᑖÌ஺(5ᑖ)selectemployeel.*,(employeel.salary-t.avgSalary)*100/employee1.salaryfromemployeel,(selectdeptid,avg(salary)avgSalaryfromemployeelgroupbydeptid)astwhereemployeel.deptid=t.deptidandemployeel.salary>t.avgSalary;

11221ஹÍJdbcÎÏÐÑḄÒÓÔ22ஹᵨJDBC᝞ÕÖᵨ×ØÙÐ)ṹ᝞"+packagecom.huawei.interview.lym;importjava.sql.CallableStatement;importjava.sql.Connection;importjava.sql.DriverManager;importjava.sql.SQLException;importjava.sql.Types;publicclassJdbcTest{/**“@paramargs7publicstaticvoidmain(String[]args){//TODOAuto-generatedmethodstubConnectioncn=null;CallableStatementcstmt=null;try(஻;Ûᨬ?⌕;kÝ@AÎϹᑏÞᙠÐÑßClass.forName("com.mysql.jdbc.Driver");//▭⚗ã;ÛᵨDataSourceᦪW᝞2ᵨ᪾å//;MᦪWæ?◤⌕ᡃçṹèéᡃB◤Datasourceds=context.lookup()//cn=ds.getConnection();cn=DriverManager.getConnection("jdbc:mysql:///test","roor,"rootH);cstmt=cn.prepareCall("{callinsert_Student(?,?,?)}'*);cstmt.registerOutParameter(3,Types.INTEGERcstmt.setString(1,"wangwu");cstmt.setlnt(2,25);cstmt.execute();//get`êM?ëḄᦪWX?D᪵éì?ᑏSystem.out.println(cstmt.getString(3));}catch(Exceptione){//TODOAuto-generatedcatchblocke.printStackTrace();

113)finally(/*try{cstmt.close();}catch(Exceptione){}try{cn.close();}catch(Exceptione){}*/try{if(cstmt•=null)cstmt.close();if(cn!=null)cn.close();}catch(SQLExceptione){//TODOAuto-generatedcatchblocke.printStackTrace();)23'JDBCḄPreparedStatementíÌStatementḄᜐï+DMsqlðñòóôõᘤ÷᡻ḄøùA+=nú¦=ûᑖ᪆çýᡂᑁÀᢣᢣ᡻ᢣ஺select*fromstudentwhereid=3---xxxxxᑴselect*fromstudentwhereid=3---xxxxxᑴselect*fromstudentwhereid=4--?᝞select*fromstudentwhereid=?——☢"Ḅឋ%&'()■+sql,ᐭ஺24.ᑏ/0ᵨjdbc2345oracleᦪ7Ḅ89ṹ25ஹClass.forNameḄ<ᵨ=>⌕ᵨ@AᢥCᦪDᢣEḄFGHIJḄKLMNO3PQRSḄK᝞TKF⁚ṹVWXPQᑣZ[9⊤TF⁚ṹḄClass]^_`ᔲᑣᢥKPQᘤḄcᡲeᑴMNOfPQTK᝞ᡠᨵḄKPQᘤijkPQᑮTKᑣmnClassNotFoundException஺PQop0ClassF⁚ṹqḼs()tᵨClassF⁚ṹḄnewlnstanceukMvwTKḄ]^_`x஺ᨵy᎛ᡃ|8DᡠᨵtᵨḄᐹ~KLᙠyᓽyjkEᨵ8y%Epy᎛s◤⌕tᵨClass.forNameM᝱PQTKp0KLᙠᦻDḄ^᝞springḄiocD,ᐭḄᐹ~Ksp᪵ḄjdbcḄKLᦻᩭḄ)ᙠtᵨq¡ᵨ¢ᦋ¤8s()¥ᣚ

114KL஺26ஹᜧᦪ7¨©Ḅᑖ⚓¬uk஺@Aᨬ¯Ḅ°kᑭᵨsql²³ᑖ⚓p᪵´µnḄ¶·Dsᒹ¹º⚓Ḅᦪ7ᑁ¼஺½sql²³jk]¾ᑖ⚓Ḅ¿À©()ὃ⇋_ᜧḄ¶·Ã᪗EÅuJᩭƺ⚓Ḅᦪ7஺sql²³ᑖ⚓¡ÇḄᦪ7È©Ḅᑖ⚓uᫀᔜ¡/᪵©☢ËÌḄÍÎᦪ7ÈḄᑖ⚓sqlAsqlserver:Stringsql="selecttop"+pageSize+n*fromstudentswhereidnotin"+"(selecttop"+pageSize*(pageNumber-1)+nidfromstudentsorderbyid)"+"orderbyid";mysql:Stringsql="select*fromstudentsorderbyidlimit"+pageSize*(pageNumber-1)++pageSize;oracle:Stringsql="select*from"+(select*,rownumridfrom(select*fromstudentsorderbypostimedesc)whererid<="+pagesize*pagenumber+")astH+"wheret>"+pageSize*(pageNumber-1);27ஹᵨJDBC´µÏÐᡂÒᓫÔË⌕9ṹᑏnᩭὃÕᭆ᳛᩽ᜧ.Connectioncn=null;PreparedStatementpstmt=null;Resultsetrs=null;try{Class.fomame(driveClassName);cn=DriverManager.getConnection(url,username,password);pstmt=cn.prepareStatement("selectscore.*fromscore,student+

115"wherescore.stuld=student.idandstudent.name=?”)Ûpstmt.setString(1,studentName);Resultsetrs=pstmt.executeQuery();while(rs.next())(system.out.println(rs.getlnt("subject")+“”+rs.getFloat("score"));}}catch(Exceptione){e.printStackTrace();}finally(if(rs!=null)try{rs.close()}catch(exceptione){}if(pstmt!=null)try{pstmt.close()}catch(exceptione){}if(cn!=null)try{cn.close()}catch(exceptione){})28ஹpÜ9ṹᨵ>¡ÝÞᜐ?try(Connectionconn=Statementstmt=ResultSetrs=stmt.executeQuery("select*fromtable1");while(rs.next()){)}catch(Exceptionex){)@:áᨵfinally²³ᩭᐵãᔜ0_`ä᜜tᵨfinallyÞq⌕Ôæ¨ḄEçèᙠtry²³ᙽḄ᜜☢)ᙠtry²³ᙽÞ᜜ḄfinallyᙽDê()45pëæ¨஺

11629ஹ"nᦪ72ìḄíJ2EEîïᘤðywñ/Eᦪ¨Ḅì23/òᢝ¡ôõöᦪ÷Ḅì2஺øᡝú8◤⌕2yì8Z[/0ûtᵨḄì23üᐸ⊤þ=ÿ஺᝞ᨵᦪḄḄᦪᨵᦪ஺ᵨḄᵨᡂ"#$⊤&'ᐸ)ᵨ*+ᵨ,-஺./01‘34ḄConnection678ConnectionḄ9ᳮ9ᳮConnectionḄclose0;<6=>ᐵ@6AB9ᳮḄConnectionCDE4ᑮG஺30ஹ'IJ⌕ᵨORM?LJDBCᨵM<᪵O0rm6PQR6AobjectSTᡂᦪUVGḄ&WᡈὅAᦪUVGḄ&WSTᡂobjecdtᡃ[*+ᵨjdbcᩭ./,PQRᐸ.᝞ᡃ[Ḅ⚗^6_`ᢥ᯿oop01cᑏḄeᡃ[Ḅjdbc

117ḄᔜᦪᙠXMLᦻ஺3ஹᵨjdom᪆xmlᦻ᝞!ᦻ"⚪$᝞᪆$%:'᝞()ṹᵨ+ṹ,-!packagetest;importjava.io.*;publicclassDOMTest{privateStringinFile=''ciWpeople.xml"privateStringoutFile=nc:\\people.xmlHpublicstaticvoidmain(Stringargs[]){newDOMTest();)publicDOMTest(){try{javax.xml.parsers.DocumentBuilderbuilder=javax.xml.parsers.DocumentBuilderFactory.newlnstance().newDocumentBuilder();org.w3c.dom.Documentdoc=builder.newDocument();org.w3c.dom.Elementroot=doc.createElement("ὁ1”)3org.w3c.dom.Elementwang=doc.createElement("4");org.w3c.dom.Elementliu=doc.createElement("ᦻij");wang.appendChild(doc.createTextNode(Hᡃ84ὁ1”))3root.appendChild(wang);doc.appendChild(root);javax.xml.transform.Transformertransformer=javax.xml.transform.TransformerFactory.newlnstance().newTransformer();transformer.setOutputProperty(javax.xml.transform.OutputKeys.ENCODING,"gb2312");transformer.setOutputPropertyGavax.xml.transform.OutputKeys.INDENT,"yes");transformer.transform(newjavax.xml.transform.dom.DOMSource(doc),newjavax.xml.transform.stream.StreamResult(outFile));}catch(Exceptione){System.out.println(e.getMessage());})}

1184ஹ+:ᵨJAVA᪆XMLḄ,.%<ᵨSAX,᪆XMLXMLᦻ᝞(<vname>4=>?@A▾6258113ᵱ,1955DEFG95DHᐭJᓭᜧAMNHOSAXHandler.javaimportjava.io.*;importjava.util.Hashtable;importorg.xml.sax.*;publicclassSAXHandlerextendsHandlerBase(privateHashtabletable=newHashtable();privateStringcurrentElement=null;privateStringcurrentvalue=null;publicvoidsetTable(Hashtabletable)(this.table=table;)publicHashtablegetTable(){returntable;)publicvoidstartElement(Stringtag,AttributeListattrs)throwsSAXException(currentElement=tag;)publicvoidcharacters(char[]ch,intstart,intlength)throwsSAXException{currentvalue=newString(ch,start,length);)publicvoidendElement(Stringname)throwsSAXException{if(currentElement.equals(name))table.put(currentElement,currentvalue);)

119)JSPᑁQRSTṹ,SaxXml.jsp:vTITLE>ᒈ᪆XMLᦻpeop,e.xml<%@pageerrorPage=ErrPage.jspcontentType=text/html;charset=GB2312%><%@pageimport=java.io.*%><%@pageimport=java.util.Hashtable%><%@pageimport=org.w3c.dom.*%><%@pageimport=org.xml.sax.*%><%@pageimport=javax.xml.parsers.SAXParserFactory%><%@pageimport=javax.xml.parsers.SAXParser%><%@pageimport=SAXHandler%><%Filefile=newFile(c:\people.xml);FileReaderreader=newFileReader(file);Parserparser;SAXParserFactoryspf=SAXParserFactory.newlnstance();SAXParsersp=spf.newSAXParser();SAXHandlerhandler=newSAXHandler();sp.parse(newInputSource(reader),handler);HashtablehashTable=handler.getTable();out.println(ᦟ1?@⊤);out.println(XY++(String)hashTable.get(newString(name))+);out.println(A▾++(String)hashTable.get(newString(college))+);out.println(ᵯ[v/TD>++(String)hashTable.get(newString(telephone))+);out.println(ᜓ]++(String)hashTable.get(newString(notes))+);out.println();%>5ஹXMLᦻ᫏_`ᨵbc,$defgᨵhijk$᪆XMLᦻ᫏ᨵlb,$a:mc,dtdschemab:hijk

120᪆rst8uDTDvwxschemaḄ᪷hzḄ{c:ᨵDOM,SAX,STAX|DOM:ᜐᳮᜧᦻᐸឋ(Ḅᔍ஺s"⚪8ᵫDOMḄ᪛᪀ᡠ⌼ᡂḄs᪀ᓰᵨḄᑁDOMᙠ᪆ᦻf᦮ᦻ᫏ᐭᑁ〉ᔠXM¡"SAX:¢£¤DOM,SAX8M¥¦ḄXML᪆,஺d§¨©ªXMLᦻ¢◤⌕®ᐰ°±᦮ᦻ஺²⍗ᑮµᦻ¶ᜮᦻ᫏¸ᡈὅ᪗¼¶ᜮ½᪗¼¸d¾¿wMᵨᡝÁÂᙠᐸNHMᑏᐭᜐᳮ)ṹᩭᜐᳮXMLᦻ〉ᔠXMLḄ§¨¡"STAX:StreamingAPIforXMLStAXÅ.ÆḄ᪾ȽÉᢈË1ஹÌÌÍStrutsḄᳮ஺%<1.struts8ᢥMVCÏ,ÐÑḄWebÒ᪾ÈᐸÓdÔ8ᜧᜧḄservletsServletYÕActionServletᡈ8ActionServletḄÖO஺ᡃeᙠweb.xmlᦻ×ØᔠÙᱯÛḄᡠᨵÜÝÞßsServletᜐᳮsServletà᯿ᦻrÁÕ/WEB-INF/struts-config.xml×ᔜÜÝᑖkᑖߢãḄactionäᜐᳮ஺᡽xæçèḄ8ActionServletformbeanòú⌴ßactionḄexecuteüf¾HᵨformbeanḄvalidateü᪥þÿᨵ᪥formbean⌴actionḄexecuteᔲᑣ┯⚓☢┯⚓☢ᵫinputឋᢣ"#$%&ᦻ()*ὅ,-./01,inputឋ234errorឋᡃ6☢7ᔠ9▭Ḅ;<ᦔ>?<ᑖ᪆஺4.action᡻HI*7>HI4ᵨActionForwardᩭ⊤GḄactionforwardstruts-config.xml%&ᦻ(NḄ%&ᐵὶᑮRjsp⚓☢S,TUNVᵨḄ4ᙠstruts-config.xml%&ᦻ(,jsp⚓☢X&ḄYZ1᪵\]9^actionTU_ṹaḄjsp⚓☢1bḄc὚஺estruts\fgᨵhiḄjᵨ☢Ḅklm⌕nopᩭ஺2ஹrreHibernateḄᳮc஺t:

1211.☢ᔣXwḄx(ᑁz;<T\]ᳮcᡂ|4ᙠ3}~ᔜ'ḄᐵᵨḄᩭᦋᔜḄ᝱ḄT3TU;<ḄT*.᪵4⌕ᑮ7>TUḄ;<7>Ḅ|⊤^ᙠᑁNḄ᝱ᓄ஺2.,ᙠᐵ£ᑁ¤3¥Ḅ¦§ᢝTUḄ;<᝱◤⌕ᑁNḄ᝱§ᑮᢝªᓄXᜓ¬ᢝªᓄXᜓNឮ®pḄ᝱¯4§ᑮᐵᦪ±²ᩭ§ᜧ´µ¶஺¬JavaTUḄ;<·fᩭ¸§᝱Ḅ·f¹º»;<Ḅᐸ½·fᩭoj¾4¿3ÀÁḄ▬·fjavaÃᵨjdbcᩭ9^·f3ÀÁḄ·fᓾ⌕Åᑏᜧ´Ḅ_ṹ2ÇḄÈÉÊÊ4§ឮ®nËlÌᜧ´Ḅjdbc_ṹnÍᨵ-.ᢈÏдÑ4ÃᵨᝅÓ<ÔÈḄ᪗Ö_ṹ×ØᩭÅᑏ4ÙÚÛ®ឋḄÜ*஺3.ᦪ±²§javaTU;<ÝḄឮ®ᐸ9|49^javaaᐵᦪ±²ÞßḄ᧜áᐵb,ORMᓽObjectRelationMappingã6\]äåJDBC_ṹᩭ9^·fäåpᩭḄÝæb,ORMfᓉèHibernate|4ᐸNḄé

122publicvoidsetComputer(Computercomputer)this.computer=computer;}}k᜜mOnoᵫcdq.)r/cd9s᪗qu)vcdwxᑮᔆ-qz){|}s᪗ᔆ὚஺ᙠspringḄ<=ᦻ?3<=ᱏ᝞3.SpringIJAOPᢈVḄKLAOPa+☢ᔣᑗ☢P1'3ᨵZᔜ7ḄḄnᙠn3⌕ᐭOḄṹE᝞ᐭᩗ▲ᑨᐭ5ᜐᳮOᵨa+AOBA0⚗¢ᵨḄ'ᳮᢈV£ᡝ¥12¦§ᵨs᪗¨§ᵨᳮᳮ}s᪗᜜ᐹᨵ7ªḄn«¬ᨵmOnXY7ªḄn«¬.'7ªḄ/0u'+s᪗Ḅ6ᙠJDK3¢ᵨProxy®¯᝱ᳮḄn+)/0®ᡂ᝞²⌕+)®ᡂ6ᑣXYᵨCGLIB஺ᙠ®ᡂḄᳮḄn3ᐭ§ᵨs᪗Ḅ7nḄᳮYAdviceF´µIJ¶ᯠ⌕CD¸ᳮF¹º◤⌕s᪗Advice஺springIJOMᢝ¼◤⌕ᙠspring<=ᦻ?3<=m)ᐗBᓽXᳮaopE᝞

1235ஹ¾¾Struts3ḄActionservlet6ஹStruts¿ÀÁ¿Á:1.MVCÃ᪀#ᨎÅÆÇὅ¼ᐵeÊËÌÍḄ.2.ᨵÏÐḄtagXYᵨ,StrutsḄ᪗ÑÒ(Taglib)᝞ᮣÔ¯ᵨᑣᜧᜧIÕÆÇᦔ᳛3.⚓☢ÙÚÅḄᾭÜÝ#ᨎ஺4@.)<=ᦻ?ᓽXvÞ᦮)ᔜàᑖ]^Ḅὶ9âãḄäåᨵḼçᜧḄLᜐ஺èᐸ'8k.ᢇÆÇὅ/ê)⚗sëO¿ìíîݬ¶஺4.IJExceptionᜐᳮïᑴ.5.ᦪòÒó/ôõᳮ6.MᢝI18NÀÁ—,wᑮøùúë◤⌕<=forward᝞²ᨵᓝ)øùúḄjsp>◤⌕<=ᓝüstruts>¨ýþᒹᨵ᎛ஹᦻ◤⌕ᦋforwardᦋ⌕᦮⚗!tomcate"᪵Ḅ%&ᘤ()*+,%&ᘤ-ஹ-ஹStrutsḄAction)◤.thread-safe/0122ᐕ45678ᜐᳮᡠᨵḄ<஺ᡠ>actionᵨᑮḄᡠᨵḄABC)◤D5EF"GHIJKLMᐰḄO⚪஺Q'STU/V.StrutsḄActionCEWebX὚ᔠᙠ5I>"᪵1ḄST]^_Web`ᘤᓫᐗSTcde6f஺Ugᨵ5JunitḄ᡽ijᐹStrutsTestCasel>6f1ḄᓫᐗST஺mஹnoḄpᣚ.StrutsḄFormBeanrᡠᨵḄᦪtCuvStringno1l>wᵨjᐹCommons-Beanutilsxynopᓄ஺{1ḄpᓄC.ᙠClass|}!~pᓄḄno.UlḄ஺nopᓄḄ┯ᵨᡝc.eḄ஺ஹServletḄ]^ឋg.StrutsᜐᳮAction)◤⌕]^ServletRequestServletResponseᡠᨵ1᤮ῃUJServlet`ᘤ஺ஹ⊤0/☢.StrutsᡂJJSTLᡠ>1⌕wᵨJSTLḄ⊤0ᩭᦪt஺l.JSTLḄ⊤0ᙠCollectionHឋ/☢ᜐᳮ¡¢d£஺¤ஹAction᡻yḄ¦ᑴe.Struts¨©5Action᝞«¬¦ᑴ1Ḅ᡻y®¯°e஺±²³⌕8ᑏServletᩭ6f³Ḅ"µ¶◤஺·ஹAction᡻yḄᜐᳮ.StrutsᜐᳮActionḄ᎛.¸_classḄhierarchies>deᙠactionᜐᳮxy¹u஺ºஹ»¼ᢝU¾.ᙠstruts¿6▭.5⊤ᓫFormÁ5Actionn(ᡈDispatchAction)ᣚ5ÄÅÆÇᙠStruts¿6▭.5⊤ᓫȶÁ5»struts"É»/0Êvapplicationevent-applicationeventcomponenteventËÌ.5ÉÍÎÏḄ»

1247ஹSTRUTSḄÁᵨÐ᝞STRUTSÑ᪀ÓStruts.ÔᵨJavaServlet/JavaServerPagesᢈÖ×ØWebÁᵨL®Ḅ×ÙBṹḄframework஺ÔᵨStruts¶×ØÛ¸_MVCModel-View-ControllerÜÝÞ0ḄÁᵨ᪀Ñ஺Strutsᨵ᝞ßḄ⌕µ¶Ç5.ᒹá5controllerservlet¶¯ᵨᡝḄ<Ø〈ᑮËÁḄActionã஺-.JSPäᵫtagæç~ᙠcontrollerservlet¿èéᐵὶ¼ᢝìí×Øᕒ¨©ïð0⊤ᓫÁᵨ஺Q.èéJ5ñᑡ6ᵨãÇXMLᜐᳮஹógJavareflectionAPIsä,ᜐᳮJavaBeansឋஹô▭ᓄḄèõö஺8ஹÆÆstruts1÷struts2Ḅø}஺1.C.MVCḄWEBfᓉÑ2strutslḄὁû᪾ÑÁᵨdýþᨵdÿḄẠᵨ◅ᡂstruts2ᯠ᪾ᵨ!"#ᡂ$%&Ḅ◅'(ᓄ*ᕒ!"#,-ᵨ⚗/Ḅ◅0ᦪᜧᵨ*ᡂ33.struts2456ᙠ89ḄẠ:;<ᩭ>ᦋᗐ'Aᗐstruts"BḄCDE◍strutslBCDGH%IJ⚪ᙠstruts2LᑮNOI஺4.strutslḄ8QRᑴᘤCServletUVWActionServlet-struts2Ḅ8QRᑴᘤCfilter>ᙠstruts2.0BYFilterDispatcher>ᙠstruts2.1BYStrutsPrepareAndExecuteFilter஺5.strutslḄaction◤⌕\]Action^struts2Ḅaction_`#\]ab^cstrutsl"dCefḄᡠᨵijᐳlCActionmnstruts2"dCefḄoijᑖqᵨCrsActionmn"tᡠᨵ"struts2ḄAction#ᵨὃ⇋wxyᐰJ⚪஺6.ᙠstrutslBᵨformbean{|ij}ᦪ>ᙠstruts2B~ᵨactionḄឋᩭ{|ij}ᦪ஺7.strutslBḄᙠCActionBᓽ\]DispatchAction⌕᪥⌕#᪥c"struts2_`ᢣ"᪥CAction\]TActionsupportᙠ^BᑏNvalidateXxxᑣ"Xxx᪥஺CijᩭNḄ᡻xᑖ᪆struts2ᢝᑖ¢ᙽ_`#d¢ᙽ:¤#dḄurl8¥>¦§packageḄnamespaceᩭm¨Ḅcstruts2ᢝ©^ªḄ«¬cstruts2Ḅ«¬ᙢᙬ_`¯᝱Ḅᓽ«¬ḄUVᢝ(±²Ḅ³n´µ¶ᜫ¸¹ºᩭ»⌕¼⌴boardid஺«¬ᑁ¿ÀÁ☢ÃḄ᪗Åᵨognl>⌕elÆᜧᙠÇ▭ᓄ☢ᢝᑖ¢ᙽÉᳮË¢ᙽᵨᑮd᪵Ḅkey"#dḄÍÎcÏStrutsl#dStruts2"ᵨᡝḄoCÑij>ÒÓCActionᡠ`Struts2B

125ḄActionwxyᐰḄ஺ÔᡃᓺtᨬØÙḄÃstrutsÚ¤ᦻÜBḄredirect«¬Ḅurl#ÝÞ}ᦪHstruts2Ú¤ᦻÜBḄredirect«¬_`Þ}ᦪ஺9ஹhibernateBḄupdate()'saveOrllpdate()ḄàásessionḄload()'get()Ḅàq஺10ஹâãHibernate'JDBCḄäEåæ᝞bèᑏConetomanyÚ¤ᦻÜ.11'iBatisÏHibernateᨵê#dæ!dåÃëìjdbcapiḄíîïJð⁚ᵨᡃò#ᵨÏjdbcapiᡭô⍝ö_`ïJᦪ÷.jdbcapixxø»ùsqlúûÏjavaüṹþᩖᙠ◤⌕sql⁚ᳲ஺ibatisḄᜐjdbcapiḄ⁚sqljava!ṹ#$ᑖ&'()*+,-./012345645Ḅ+ᔠḄ89queryForList:;45+ᔠᵨqueryForObject:;ᓫ>45'(,-2345Ḅ?ឋA⌴CsqlḄDᦪ஺HibernateF>ᐰ,-Ḅ0rm᧜IJᐹLMN,-Oᡂsql,ibatis◤⌕ᡃS,TᙠxmlUVᦻXYᑏsql[hibernate⌕\ibatis89]^6_ᜧa஺b1hibernate,-OᡂsqlᡃScdeᑴgᡃShcdiᑏᱯkḄlᦔ᳛Ḅsql஺4opqrsᩖḄsqluvhibernateMNwᡃSxᡂyF4oᱯzsᩖḄuvhibernateh{〉}~᎛ᵨibatishFq┯Ḅ⌱b1ibatisFᵫᡃS,Tᑏsql஺12ஹᑏHibernateḄ4a6a4ᔣᐵὶḄormUV9ஹhibernateḄinverse?ឋḄᵨᫀᢥ᯿Objectᦪᦪᯠ,Tbeanᫀ4>⊤Ḅbeanᑏ᪀⌼ᦪ\᝞⊤⌕ufield1,field2¡>¢£¤

126¥ᨵ>᪀⌼ᦪhFBean(type1filedl,type2field2)ᯠᙠhql§☢hMN©ªOᡂ~>bean஺13ஹᙠDAOY᝞«3¬DAOi®¯°ᫀᢥ᯿Object[]ᦪᦪᯠ,Tbeanᫀ4>⊤Ḅbeanᑏ᪀⌼ᦪ\᝞⊤⌕ufield1,field2¡>¢£¤¥ᨵ>᪀⌼ᦪhFBean(type1filedl,type2field2)ᯠᙠhql§☢hMN©ªOᡂ~>bean஺14'spring+HibernateY±ᡲᫀ³¥UVᫀᢥ᯿Objectᦪᦪᯠ,Tbeanᫀ4>⊤Ḅbeanᑏ᪀⌼ᦪ\᝞⊤⌕ufield1,field2¡>¢£¤¥ᨵ>᪀⌼ᦪhFBean(type1filedl,type2field2)ᯠᙠhql§☢hMN©ªOᡂ~>bean஺15'spring+HibernateY±ᡲᫀ³¥UV?ᫀᢥ᯿Object[]ᦪᦪᯠ,Tbeanᫀ4>⊤Ḅbeanᑏ᪀⌼ᦪ\᝞⊤⌕ufield1,field2¡>¢£¤¥ᨵ>᪀⌼ᦪhFBean(type1filedl,type2field2)‘ᯠᙠhql§☢hMN©ªOᡂ~>bean஺16.hibernate#$a⊤uv>⊤Yᔜ·>¢£¸hF¹uvᩭḄ)*+»ᨵ>23¼½4}᝞«ᫀᢥ᯿Object[]ᦪᦪᯠ,Tbeanᫀ4>⊤Ḅbeanᑏ᪀⌼ᦪ\᝞⊤⌕ufield1,field2¡>¢£¤¥ᨵ>᪀⌼ᦪhFBean(type1filedl,type2field2)ᯠᙠhql§☢hMN©ªOᡂ~>bean஺17.¿ÀÁHibernateḄÂÃÄᢥ᯿NÁÅÆᩭ;Ç(1)✌ᐜ¹ËÌÍ¥FÃÄ(2)ιᨵhibernateḄSession

127hFÂÃÄᓽᨵÂÃÄ1Í¥⌕ᨵÂÃÄ(3)ᨬι᝞«UVHibernateḄÂÃÄ஺জÃÄhFÒNÓÔᦪÕYuvᩭ6Öᵨ×Ḅ45ØÄᙠᑁÄY(>ᦪ)᪀Y)~>ᦪ)᪀ÛFᡈ¼ÝHashmapÞN⌕Öᵨß>45ᐜuvÃÄYFᔲᨵ~>45᝞*ᨵᑣÖᵨÃÄYḄ45᝞*»ᨵᑣiuvᦪÕâuvᩭḄ45ØÄᙠÃÄYNãÁäÖᵨ஺Á☢FÃÄḄå!ṹæhibernateḄçÂÃÄᵨÁ☢Ḅå!ṹᑖ᪆CacheḄ2¬éᳮDao(hashmapmap=newmap();UsergetUser(integerid)(Useruser=map.get(id)if(user==null)(user=session.get(id);map.put(id,user);)returnuser;}}Dao(Cachecache=nullsetCache(Cachecache)(this.cache=cache}Usergetllser(intid)(if(cache!=null)(Useruser=cache.get(id);if(user==null){user=session.get(id);cache.put(id,user);)returnuser;)returnsession.get(id);

128)}QHibernateḄSessionhFìÃÄᡃSÛ½01HibernateḄÂÃÄÞíÖᵨsessionÔᦪÕYuv>45Session¸FᐜÔ,TᑁîuïFᔲÄᙠ~>45Äᙠᑣ©ª:;qÄᙠðiᦪÕâuvḄ)*ØÄᙠ,Tᑁî஺ᵫoSession!⊤äñò×ó>Session>ᦪÕôªõᐵôᡠNSessionᨬq⌕÷øØᢝᡭûÛüᵨo>ýþÞYᙠýþ)ÿᐵ஺SessionᐰḄᐳ᧕⚪஺ᨵ!ᐰ"#$%Ḅ&'()*Ḅ&'ᵨ(ᨵ,ᜧḄ&'./01HibernateḄSession234&'Ḅ&'5ᵨ67ᵨ./ᜧ஺HibernateḄ84&'⌕:Hibernate;<3!ᐰ"&'=>?@ABCᐳ2&'஺ᡃEFGḄ3HIᵨJᐸLHMBCIᵨsessionNᨵ2!ᦔP஺ঞ84&'RSTHibernateḄUVWVXTYZ[Ḅ\]ᔆᖪ>`aAbcᨵ&'\]d᝞EHCache>OSCacheff஺ᙠHibernatehIᵨ84&'.✌ᐜ⌕ᙠhibernate.cfg.xml;<ᦻVh;ᨵ2v᧕;ÙÚᙠÛ@ÜÝ%஺Þ᜜JDOᮣà0:áBCᙠâãᦪäå%æÌ஺JDBC☢ᔣᐵéᦪÈRDBMSJDOᵨbcᑮâãᦪäåḄ'¾êë᝞ᐵéᦪஹᦻV'XM®íz{ᦪÈODBMSffIîᵨBÑïឋð஺

12920ஹ¤¥springḄIOCAOP21'STRUTSḄÍ5ñ!22ஹspringEJBḄóô!!A.UVÍõö÷ø1'UML[☢᪗¼ù÷úûUMLᵨdü☟᝱üÈᒹஹᒹ,ᔠ,஺2ஹj2eeᵨḄ!ᔆ஺#ᐳ23%ᑖ'ᜧ)*+,-᪀,,ᡃ012ᐸ4ᵨḄ6ஹ7%ᑖ67)*+,!ᔆஹ!ᔆ89ஹ:!ᔆஹᓫ<-᪀,ᒹ=ஹ〉?ᘤAᔠBᳮDEὅ᱐HᶍᯠKL┐NO៉ḄQQNḄᳮRᓽT஺Java4Ḅ23%)Factory!ᔆBuilder+⌼FactoryMethod!ᔆ89PrototypeVW,Singletonᓫ<FacadeX☢Adapter〉?ᘤBridge᫑᫡CompositeᔠᡂDecorator=⛲Flyweight^ᐗProxyBᳮ1CommandabInterpreterRcᘤVisitordeὅIteratorfBgMediatorhiὅMementoᜓklObserverDEὅStatem᝱StrategyHᶍTemplateMethodo89ChainOfResponsibleitypqr!ᔆ)!ᔆ7s%tuvᵨᑮḄ᪷y!ᔆḄTz᪷y{|Ḅᦪy~ᡂsA4sḄ<sAᨵsᐳḄ:᱄Ḅ89789┐ḄᦪyḄ஺✌ᐜ◤⌕sḄgḄ894Ḅ89஺ᯠK◤⌕s!ᔆ!ᔆTz᪷yᩩ~ᡂḄg<஺2ᑮgḄ

1303ஹ4¨ᵨᑮ©ᵨᙠ«¬ᔠ®¨¯°sᙠᡃ±Ḅ²᛻4´µḄe⚪ᯠK¯°e⚪ḄR·8ᫀḄ᪶º஺%8NTz»ᦪ¼ᙢvᵨ©¾ᨵḄR·8ᫀ»◤ᙠ¿ÀḄ!஺Á⌕ᵨᑮMVCḄ஺ᵨᩭJSP/ServletᡈὅJ2EEḄᐵÅᵨ஺Æᓫ!ᔆÇ஺È.j2eeÊᑖ1ஹBSËCSḄὶÍËÎ6஺C/S7ClienVServerḄÏᑏ஺ÑÒᘤÓᵨÔឋÖḄRC•!×ᡈØ,ÙÓᵨᜧ,ᦪyÚÍÛ᝞OracleஹSybaseஹInFORMixᡈSQLServer஺Ýᡝß◤⌕à=áᵨḄÝᡝßâ஺B/S7Brower/ServerḄÏᑏÝᡝÙã0⌕à=säåᘤBrowser᝞NetscapeNavigatorᡈInternetExplorer>ÑÒᘤà=OracleஹSybase-InFORMixᡈSQLServerÇᦪyÚ஺ᙠ%-᪀çᵨᡝè☢éᐰWWWIåᘤsÊᑖëÒìíᙠîß7Á⌕ëÒìíᙠÑÒᘤß஺äåᘤWebServerᦪyÚᦪy஺C/SËB/SÎ6)1•ð²᛻)C/Ssñ+òᙠáᵨḄóôãØö÷Ḅóô²᛻øùóúûLáXÑÒᘤ{|üýᦪyᣚÑÒ.B/S+òᙠÿḄḄ᛻ᵯᵨᜓ.ᳮ.ᨵ!C/S"#Ḅ〉%'()*⌕ᨵ,-./012ᘤ452♦67ᐰ⌕9:C/S()☢ᔣ=6>?ḄᵨᡝA67ᐰḄBᑴDEF#.()GHIJḄ./KᵨC/SL᪀〉N.OPQRB/SSTUᑖOWX.B/SYZᙠ\67ᐰḄBᑴDE=6]OD☢ᔣO^Ḅᵨᡝ஺3•6abc᪀:C/SabOP"defgaOP6ᩗ▲jkl᪥n6./o5pHOPqrὃ⇋.B/S67ᐰPuvwpHḄjfḄὃ⇋YZᙠ◤⌕"dyᓄḄ{Ạ.!C/Sᨵ"GḄ⌕9B/SL᪀Ḅabc᪀S}Ḅ~MSḄ.Net.ᑡḄBizTalk2000Exchange2000ᐰ☢ᢝḄ᪀YḄ./.SUN0MḄJavaBean᪀ᢈB/S"dᡂ.4•fᵨ:C/SabOPOḄ᦮ឋὃ⇋᪀Ḅfᵨឋ᝞ᙠB/S⌕9Ḅ᪀Ḅfᵨឋ.B/S6ḄjfL᪀⌕9᪀=6ZḄD.D=6qḄfᵨ.4ᩭḄ⚶OPᑭᵨ¡ᙠᜋḄ£ᜮ¥5•./¦§:

131C/Sabᵫ©᦮ឋª᦮ὃ«ᜐᳮ®Ḅw⚪Pu./ᓣ±.ᓣ±².OD¡(³ᐰ´Ḅ./B/S᪀µᡂ¶☢᪀³·Ḅ"ᣚ¹®./Ḅº»ᓣ±../¦§X├½ᑮᨬÀ.ᵨᡝÁ7Â4OP¹®ᓣ±.6•ᜐᳮw⚪:C/SabOPᜐᳮᵨᡝ☢>?ÃÄᙠ=:Å7ᐰ⌕9G◤9,-./=ᐵ.%ÇÈ=:Ḅ./B/SYZᙠ\☢ᔣ:ḄᵨᡝAᑖᦣᙢËC/SºÌ-ᑮḄ.,-./ÍÎᐵ.ᨬÀ.7•ᵨᡝÏÐ:C/SjYZḄWindowÍÎ⊤®¶Ìᨵ▲6abᕒÓÔ⌕9qGB/SYZᙠ12ᘤᨵ"dÕÖ0×ØḄ⊤®¶ÙᵨᡝÚg.ÃÄᜧUᑖ²H½Ü½ÜXSᡂÝ.8•g:C/Sab()ᐺßḄàáâᩗḄIãÙᜐᳮÚäឋ=6ÜB/SgᔣOåᓄB-BB-CB-GஹgᔣḄåᓄ"çÚ᧕àé஺2ஹ%ᵨêëᘤWEBSERVEḄÅ·ì%ᵨêëᘤ:Weblogic-Tomcat-JbossWEBSERVERIISஹApache3ஹ%ᵨêëᘤᨵîïìBEAWebLogicServerIBMWebSphereApplicationServer»Oracle9iApplicationServerjBoss»Tomcat4ஹJ2EEðñ?ó:Je22SunWôõḄjk(multi-diered),ᑖTÙ(distributed),{©µ(component-base)Ḅ÷ø±%ᵨùß(enterprieseapplicationmodel).ᙠË᪵Ḅ(³%ᵨ./àOᢥ᯿Dᑜᑖþ:ḄµËïµÿᙠᜐḄ(tier)஺ᡠᒹᡝ(clietntier),web,Business!"#$(%S)஺&'()Ḅ*+,j2ee-./ᑤᦋ2஺5ஹJ2EE.ᢈ56.786.᪾:;<=.J2EEJ2EE>?.&'᪗A&'BᑖDEᵨḄGHIJḄ᪗A78஺J2EEK.&'᪾:ᒹJDBCஹJNDIஹRMI-JMSஹEJB-JTALᢈ5஺

1326ஹMNOPᙠJ2EEQᵨḄRSTUVWXᡈZᓫ\]^web_ᘤ,aᜐᐸḄᵨcdXJSPSERVLETIJ&'e᛻JSP,SERVLETghi_ᘤḄe᛻jkhlmnoᐵqᐸr#$s⚪஺u⌕ᨵWEBxyᘤᩭ{|஺}᝞,TOMCAT,WEBLOGIC,WEBSPR%_ᘤIJḄhl⍳J2EEḄWEBAPPLICATION᪗A஺ᡃ⍳O᪗AḄWEBxyᘤ-J2EEḄWEB_ᘤ஺EJB_ᘤ,Enterprisejavabean_ᘤ஺iᐹᨵU⚞ᱯ⁐஺IJaUᙠᐸḄEJBᔜᳮ஺⌕J2EEḄEJBᐭ_ᘤ-¡_ᘤTU¢ᦔ᳛Ḅᳮ஺O¥¦|ᡂḄhlᩭ¨©#$ª«Ḅxy஺}᝞¬xyஹyᳮ஺JNDI,XJavaNaming&DirectoryInterface^JAVA®R¯°xy஺u⌕IJḄ.,IJ&'¯°#$±ᐸrᔜᙢḄᵨcdᙠᐸ☢ᶇPµ¶Ḅ·¸¹º»¼2½¾¿ᑖDEᵨcdḄ஺JMS,JavaMessageServiceJAVAÀ"xy஺u⌕{|ᔜ'ᵨcdÁÂḄ¥Ã஺ᒹÄNÄÅÆ஺JTA,XJavaTransactionAPI^JAVAyxy஺IJᔜᑖDEyxy஺ᵨcd◤ÈᵨᐸIJḄhlᓽ஺JAF,XJavaActionFrameWork^JAVAÊᐰÌÍ᪾:஺IJ&ÎÊᐰÏᑴÑ☢Ḅ᪾:஺±GHὅ¥¦ᔜÓÔµ¾Õ{|µ¶Ḅ'ឋÊᐰÏᑴ×ᶍ஺RMI/IIOP:RemoteMethodInvocation/internetNÙMÚÛÜÝ^u⌕ᵨ¥¦ÞcÈᵨxy஺}᝞Þcᨵ&8U&'cdrIJßἠᑖ᪆xyᡃOᙠ>ᙢ{|NᐸghÈᵨ஺âᯠä.⌕¥¦&¾Ḅåᙠæ᪀Ḅ#$ÁÂTU¥!஺RMI.JAVAᱯᨵḄ஺7ஹ᝞èaweblogicᢣ¾ᜧëḄᑁí;Xä's⚪îᐹï*+ᑡñᩭ.òóôὅ⍗ᑮ<=s⚪÷◤⌕☢☢øᑮ<=ùú¥஺^ᙠûüWeblogicḄý>X¿ᡠᙠDomianNxyᘤ¯°PḄstartServerName^/þsetMEM_ARGS=-Xms32m-Xmx200mOÈ᦮ᨬᑁ32Mᨬᜧ200M8ஹ᝞ḄweblogicḄᙠᳮ!ᑴ#$%ᦋ'()*ᘤḄᡈ-.஺ᡈὅ%ᦋ)*Ḅᦻ2ᡈὅcommenvᦻ234setPRODUCTION_MODE=true

1339ஹ᝞56◤8ᐭᵨᡝ<=ṹ%ᦋ)*ᦻ234WLSJJSEMnWLS_PW!஺?ᙠboot.propertiesᦻ2$344=@Ḅᵨᡝ

134MNFᓫᔣF³ᔣḄ஺14ஹ᝞´zᙠweblogic$µ¶ḄEJB?¤ᵨᳮ!ᑴ#ᙠ^ḄDeployment$´zᡠᨵµḄEJBᓝ.EBJ¹ᑖ1'EJBF»¼ᢈ¾XḄ¿EÀSessionBeanAEntityBeanḄÁÂStatefulBeanAStatelessBeanḄÁÂ஺EJBᒹSessionBeanஹEntityBeanஹMessageDrivenBean»¼JNDIஹRMIஹJATPᢈ¾X஺SessionBeanᙠJ2EE(ᵨÃÄ$ÅᵨᩭÇᡂ.)*ᘤwḄÉ*ÊË᝞ᦪÌÍஹÎᵨᐸÏEJBÐ2஺EntityBeanÅᵨᩭÑ⊤(ᵨÓÔ$ᵨᑮḄᦪÌ஺'¼ᡝuSessionBeanF.ÕÖᢝØឋ'Ú^XÛᙠ)*ᘤq|KḄÉ*ÜÝ஺'¼ᡝuEntityBeanF.ÕᢝØឋ'Ú^Ñ⊤.CÞᙠᢝØឋÞᘤ$ḄXḄ'ÚßàᡈF.CᵫᨵâÉ(ᵨÃÄXḄX஺SessionBeanãäᑖStatefulSessionBeanStatelessSessionBeanåÕḄSessionBeaniÓÔÜÝlᙠmethod-$᡻K6ḄFStatefulSessionBeançdèéὅḄê᝱ì]íîᩭE.C¤ᵨὅïᨵ.CQ'(ḄStatefulSessionBeanḄX஺StatelessSessionBeanðᯠ?FÜÝÐ2ñFÏᓾ6óôçd¤ᵨὅê᝱?rFEõ¤ᵨὅèéStatelessSessionBeanḄ5᎛EJBContainer¿6ï÷øᱯḄStatelessSessionBeanḄXᩭ᡻KCmethod஺ᣚû-üýᦪC¤ᵨὅᙠ᡻KÛCStatelessSessionBeanḄmethods5ïF.CBeanḄInstanceᙠ᡻K஺¥ᑁþ☢ᩭStatefulSessionBeanStatelessSessionBeanStatefulSessionBeanὑJ2EEServerḄᑁᯠStatefulSessionBeanḄᓾᙠᢝᵨὅḄ᝱஺2ஹ!⌕#$%EJBḄ7&TransactionLevel?3'EJBJAVABEANḄ'(J?JavaBean)*ᵨḄ+,-JavaBean./ᨵ12Ḅ3ᳮ67#89$&Java:;)$&Beanᕪ=>?@%ᵫJavaBean)BCᘤᡠFGH᝞TomcatḄᡠJavaBeanJᐹᨵ$&LMḄ᪀⌼ᘤ(᜜=>JavaBeanQ⌕RSSerializableTUᵨRSBeanḄᢝVឋ஺JavaBeanR▭7YZ[\COMS]^

135Ḅ_ᙢabᑁCOM+,c)deBfabghḄ஺EnterpriseJavaBeanYZDCOMᓽᑖkl+,஺c)mJavaḄnbopqᵨHRMIᢈsḄᡠEJBBnbghHfabஹftuvw஺xEJByzBk{ᙠ|᝞WebspereஹWebLogic}᪵ḄCᘤ^EJBᡝdTghḄEJB+,)=ᐸCᘤgh஺EJBCᘤ)EJB+,ḄᳮEJB+,ᵫCᘤᡠFGᳮ஺ᡝ=CᘤᩭghḄEJB+,஺4ஹEJBᒹHSessionBean,EntityBeanwḄᕜ᝞9ᳮḄSessionBean:StatelessSessionBeanḄᕜ)ᵫCᘤḄZᡝv⌕G$&BeanḄREJBCᘤd$⌕FG$&ḄBeanḄRᡝvqᵨ)¡¢£$&SᨵḄR¤¥ᡝv஺Zᡝv¦$§qᵨ$&StatefulSessionBeanCᘤyzᓽᙠ¨ᘤ^FG$&ḄBeanR.ᐵὶᑮᡝv7¬ᡝvqᵨStatefulSessionBeanḄopCᘤ®qᵨᑖ¯ᑮᡝvYᐵὶḄBeanR஺EntityBean:EntityBeanse°Y-±Ḅ².³᝱)ᢝ´Ḅ஺µ⌕ᦪ·¸^Ḅᦪ·ᙠEntitybeans¹$°஺d)ᢥ᯿Jᵨb¼ᡈὅ¨abᩭḄ஺ᓽEJBCᘤ¾¿ÀEntitybeansÁ)°Ḅ஺EntityBeansᕜeÂBCᘤᡈὅBeansÃÄᳮ஺EJB=%ᢈsᳮRÅ-Æᳮ+ÇHOMQḄ-ÆR¨HOTSSunMicrosystemsḄTransactionServiceHJTS-JavaTransactionAPIJTAÈ+HX/OpenwḄXATU஺5ஹEJBCᘤ¤Ḅ¨É⌕¤ÊËᕜᳮஹṹÍஹᢝ´ឋᳮஹÎᐰஹᳮஹ┝.ÑᳮÒ¨஺6ஹEJBḄÓ°vᑴStatefulSessionBeanÕÅᐸCacheᜧ×Àᑁ^ØᙠḄBeanRḄᦪÙ᪷·MRUᡈNRUWpRᙠÓ°ÛÓ°᝱ܲÝÞÓ°vᑴ)Zᡝßqᵨà&EJBRáop᝞â-JEJBObjectSÃÄ/ᨵã-JḄBeanRᑣᐸÛÓ°Beanå^H=¼ᑡᓄvᑴåRwè*HÓ°wR஺᝱éÝêqᵨ-JḄejbActiveejbPassivateop஺7ஹEJBḄëì:]íHSessionwBeanRîHEntitywBeanïðñḄHMessageDrivenwBeaníBeanòᑖÕᨵ᝱HStatefulwL᝱HStatelesswóì

136RîBeanᑖÕBeanᳮḄᢝ´ឋ(BMBCᘤᳮḄᢝ´ឋ(CMBóì8ஹ¨ßqᵨEJB-ÆḄë&m_õö÷øJNDI¨ùᔆJNDI¨ᙢᙬüýþឋÿHomeHomeᵨCreateRemoteRemoteᵨᐸ஺•.webserviceᑖ1ஹWEBSERVICE஺JSWDLᒹḄ஺JAXPஹJAXMḄ!஺SOARUDDI,WSDL|!஺WebServiceWebService"#$%&Ḅஹᑖ'(Ḅ)ᙽᓄ,-.᡻0ᱯ2Ḅ3⍳5ᐹ7Ḅᢈ9:<=:>?WebServiceABᐸCDEḄ,-F0GHI஺JAXP(JavaAPIforXMLParsing)2JKᙠJavaM>ᵨDOM,SAX,XSLTḄᵨḄ□஺<᪵ᙠPḄQRMPS⌕>ᵨ<=ᵨḄUP◤⌕ᦋXᐹ7ḄYZ[᎛]^◤⌕_ᦋ`ṹ஺JAXM(JavaAPIforXMLMessaging)"bSOAPcdefghijkᑴḄAPI»WSDL"mXMLn(ᵨ$o%&pqrb,st<=stuᒹv☢ᔣᦻ᫏c{ᡈ☢ᔣQc{Ḅ}{F0HI஺¦Ao§¨deḄWebService¢£>©Ḅ¦AªZḄfgḄYZ᪗஺2ஹCORB«¬®ᵨ⌶"¬®CORBA᪗"°ᐳu²³`ᳮµ᪀(CommonObjectRequestBrokerArchitecture)>ᵫu¹ᳮ,º(ObjectManagementGroup>»ᑏbOMG)᪗ᓄ஺.Ḅ,ᡂ"2J½¾(IDL),½¾2(binding:]¿bὶ)hᐕÂÃᵨQRÄGHIḄ஺ᐸḄbÅᵨ^¥ḄQRÆǽ¾Èᑏᙠ^¥ḄFQMÉ0b^¥ḄHIÊË஺

1373.Linux4ஹLINUXÌÍQGDIÎḄ஺LINUXYZḄÏ"#$᪶¤FQḄ"u"ÍQ)ÒÓÍQY7uÃÓ᪶¤FQÔÍQÕÄḄ¹ᳮᙠ᪶᜜×ᦪÙMYZ஺GDIÎbÚÛÆᜓQÎÙ஺5.g?ÝÞßàḄ⚪6ஹâmãäåæᢈ9ãäIᵨçServletsJSP⚓☢qrpageᔲ"`⊤BÓ⚓☢ᐵḄuhëឋ஺Ó⚓☢ᵫÓ¿íḄJavaservletÎîïðᨵ3òḄincludeᢣôõ"öᨵinclude÷Iø⊤ù஺<úᒹûservletüᒹûý¿ᡂservletḄJSP⚓☢request""`⊤BWebþᡝḄᐵḄឋ஺⚓☢Webᵫforwardᢣ!include"#Ḅᐵ$%session&&'⊤)ᵨ+Web,ᡝḄᵨᡝ./ᐵḄឋ஺Web0123450,ᡝapplication&&'⊤)᦮Web7ᵨ89ᐵḄឋ஺:;<=&᦮Web7ᵨ89ᒹ?⚓☢ஹ01ḄᐰB#ᵨC7ஹDEFGH#&,K%)ᩩH#&&JIḄMN஺MNO⌕QRSTa.ᩩH#UH#VWXḄYFGH#Z[2H#VWXY\2H#ᦪ^Xb.FGH#Z0_`abᓝd.ᐸg1'ᵨhᦻDᓫklmno4ஹWEBSERVICEDpqr஺JSWDLsᒹḄkl஺JAXP-JAXMḄqr஺SOAPUDDI.WSDLqr஺

1383ஹtuvwxJAVAy8zᵯ1☢|⚪~1.Talkaboutoverriding,overloading.2.TalkaboutJAVAdesignpatternsyouknown.3.TalkaboutthedifferencebetweenLinkList,ArrayListandVictor.4.TalkaboutthedifferencebetweenanAbstractclassandanInterface.5.Classa=newClass();Classb=newClass();if(a==b)returnstrueorfalse,why?6.WhyweuseStringBufferwhenconcatenatingstrings?7.TrytoexplainSingletontous?Isitthreadsafe?Ifno,howtomakeitthreadsafe?8.Trytoexplainloc?9.Howtosetmany-to-manyrelationshipinHibernate?10.TalkaboutthedifferencebetweenINNERJOINandLFETJOIN.11.Whyweuseindexindatabase?Howmanyindexesisthemaximuminonetableasyoursuggestion?12.When'Final'isusedinclass,methodandproperty,whatdoseitmean?13.DoyouhaveanyexperienceonXML?TalkaboutanyXMLtoolyouused,e.g.JAXB,JAXG.

13914.DoyouhaveanyexperienceonLinux?15.InOODwhatisthereasonwhenyoucreateaSequencediagram?Administrator10:34:201ᚮ᪘ḄMNᨵ64kḄ&ᑮᚮ=&ᑮ᪘=2᎛ᵨᑮ᎛ᵨᑮdὅMN3ᨵ100ḄᦪᨵRḄ᝞ᑮ஺4ᦪ¡n¢᝞஺£᝞¤ḕ¦§¤¨§¤©ᔳ§:&«¢ᐵ$¬Ḅ⊤37ᨵ«©ᔳᨵ᜜¯°ᵨ¨¨ᨵ᜜¯7ᵨḕ¦:±²³&m´Ḅ⌕ᨵ᜜¯µ°ᵨ=´஺ᨬ·¸¹ᜧ»¼ᑮ½¾Ḅy#¿¿À

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

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

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