Java考试题、题库、各种考试题

Java考试题、题库、各种考试题

ID:83361099

大小:13.18 MB

页数:120页

时间:2023-07-19

上传者:无敌小子
Java考试题、题库、各种考试题_第1页
Java考试题、题库、各种考试题_第2页
Java考试题、题库、各种考试题_第3页
Java考试题、题库、各种考试题_第4页
Java考试题、题库、各种考试题_第5页
Java考试题、题库、各种考试题_第6页
Java考试题、题库、各种考试题_第7页
Java考试题、题库、各种考试题_第8页
Java考试题、题库、各种考试题_第9页
Java考试题、题库、各种考试题_第10页
资源描述:

《Java考试题、题库、各种考试题》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

JAVAὃ⚪ஹᓫ⌱⚪1ஹᜐḨ᝱ᵨThread!Ḅinterrupt()#$!%&'()Ḅ*+,-()஺A)lOExceptionB)RuntimeExceptionC)InterruptedExceptionD)ClassNotFoundException2ஹ2☢Ḅ4Ḅ56-()0Filefilel=newFile(nd:\\xxx\\yyy\\zzz'!);filel.mkdirs();A)ᙠ9:;2<ᡂ>:;?\xxx\yyy\zzzB)<ᡂ:;?e:\xxx\yyy\zzzC)ᙠ9:;2<ᡂᦻAxxx.yyy.zzzD)BCD$EFG3ஹHᵨḄmain#$!ᨵB2JKᑣM)ḄNO-()஺Strings=,fxxxxxxxxxxxxxxx#123#456#zzzzzH;intn=s.indexOf(M#n);intk=s.indexOf(n#H,n+1);Strings2=s.substring(n+l,k);System.out.println(s2);A)123456B)123C)xxxxxxxxxxxxxxxD)zzzzz4ஹᐵ2☢ḄTest.javaD$QḄ-()஺publicclassTest{Stringx=T;intyRpublicstaticvoidmain(Stringargs[]){intz=2;System.out.println(x+y+z);}}A)3B)102C)12D)ᨵTU┯W5ஹHᵨḄmain#$!ᨵB2JKᑣM)ḄNO-()஺

1intb[][]={{l,l,l},{2,2},{3});intsum=O;fbr(inti=0;i)Ḅab'6cdJavaefgᡈὅthrowJK()i*+G^j6cdtry...catch...finallyᜐᳮ஺

2C)᝞Omᵨcatchᙽᣓᣍq*+G^plijcatch>K!Ḅrᦪ,H-ᡠᨵ*+G^Ḅ᱄஺D)BCD$EFG஺9ஹ2☢ḄuvwᦻAM)xG^ᵨᩭᔣᦻAtest.txt!M)ᦪ{Ꮇ9:;2F}ᙠᦻAtest.txt,TU2☢ḄTestjavaZ~iY3ᑣᦻAtest.txtḄᑁ-()oimportjava.io.*;publicclassTest{publicstaticvoidmain(Stringargs[]){try{Strings="ABCDE";byteb[]=s.getBytes();FileOutputStreamfile=newFileOutputStreamCtest.txt",true);file.write(b);file.closeO;)catch(IOExceptione){System.out.println(e.toString());A)ABCABCB)ABCDEC)TestD)ABCDEABCDEABCDE10ஹ2☢D$FQḄ-()?A⊤(List)ஹᔠ(Set)\᧜(Map)E-java.utilᒹ!Ḅ஺B)List-BᒹᐗḄᨵᔠ஺C)Set-FᒹᐗḄᔠ஺D)M~᧜ᑮBᨬqm6᧜஺ஹq⌱⚪1ஹ2☢ᐵ6ᵨᩭᑴGᡂᕒḄ¡¢()?A)publicB)protectedC)privateD)default

32ஹ2☢ᐵJava!*+ᜐᳮtryᙽḄD$QḄ-?AtryᙽZc+Hᨵcatchᙽᵨᩭᜐᳮtryᙽ!()Ḅ*+஺BcatchᙽZ£¤ᨵfinallyᙽ஺C6()*+Ḅ#$¥ᵨH¦ᙠtryᙽ!஺DG()Ḅ*+Ḅᜐᳮ£¤¦ᙠtryᙽ!3ஹG^Ḅ<§ᕜ!c+©ᔊ2☢᝱஺A«vBYC¬D®¯4ஹ°±᝞2Ḅ²ᦪ³b,2☢ḄD$QḄ-0intb[][]={{l,2,3},{4,5},{6,7,8}}};Ab.lengthḄ-3஺Bb[l].lengthḄ-30Ḅ-5஺D²ᦪ³bḄ´Yᨵ3ᐗ5ஹB-µ^C-BḄ¶µ^>2ᑡuvG^xlḄJK!QḄ-oABxl=newB;BBxl=newC;CCxl=newC;DCxl=newB;6ஹ2☢ᐵ¸ஹḄD$QḄ-஺A¸-Ḅ¹᝱᡻Yd஺¸ᙠᐸ᡻Yd!Bº

4èஹ▅ê⚪1ஹ▅ê2☢Ḅëṹjíî¢⚪(૘¢3ᑖ૙¢3ᑖᐳ6ᑖ)஺Stringsi=newString(nabcdeH);Strings2=newStringabcde")booleanbl=sl.equals(s2);booleanb2=sl==s2;System.out.print(b1+””+b2);૘4᡻YZᙠ§ðYḄM)NO᝞ñò૙óôM)(1)ḄNOḄõöòîᫀ?૘truefalse૙equals#$¿øùúûḄᑁ-ᔲÑýRþúᑨᔲᢣᔣᵨᓽᔲ஺2ஹ▅☢Ḅ⚪(૘3ᑖ૙3ᑖᐳ6ᑖ)஺importjava.io.*;publicclassTest{publicstaticvoidmain(Stringargs[])throwslOException{BufferedReaderbuf=newBufferedReader(newInputStreamReader(System.in));while(true){Stringstr=buf.readLine();if(str.equals(nquitH))break;intx=lnteger.parselnt(str);System.out.println(x*x);"#$%&☢Ḅ'૘()*+ᐭ10,-.+/Ḅ01᝞34૙()*+ᐭexit,-.567᡻%ᔩ4:;4<'૘100૙=5>?@AInteger.parselnt(str)=5BCDE"exit"Fᓄ᦮ᦪJ/KL஺

53ஹᑏ/☢Ḅ"#ஹ$%.Ḅ01(6ᑖ)஺publicclassTest{publicstaticvoidmain(Stringargs[]){newStudent("Tom”90,88);newStudent(nJackH,66,89);newStudent(nMaryn,T,76,86);System.out.println(nnaiTie\tsex\tchinese\tenglishn);Student.printQ;classStudent{protectedStringname;protectedcharsex;protectedintChinese;protectedintenglish;protectedStudentnext;staticStudentlist;Student(Stringname,charsex,intChinese,intenglish)this.name=name;this.sex=sex;this.chinese=chinese;this.english=english;this.next=list;list=this;)staticvoidprint(){Studentfriend=list;if(friend==null)System.out.println(MThelistisempty.H);else{do{System.out.println(friend.toStringO);

6friend=friend.next;}while(friend!=null);))publicStringtoString(){returnnewString(name+"\t"+sex+"\t"+chinese+”\t"+english);ᫀ'namesexChineseenglishMaryf7686Jackm6689Tomm9088zJAVA}~ὃ⚪ஹ⚪1.ḄᶇCclass,ḄᶇCinterface஺2.SocketLᝅC,ᵨIPᙢᙬo3.¡Ḅ¢ᐜ¤ᙠ1¦10§¨ᦪ©ªᜧ¬ª®ញo4.᪀⌼@A³ᱯµḄᡂᕒ@A᪀⌼@A¸¹¸º஺5.Java½¾¿ᐕÁᓫÃÄᢣÅ¿5ᨵ᱄஺6.JavaÈḄ᡽ʸ.java,ÌÍ"#.ḄḄ᡽ʸ.class஺7.ᙠΨ¿5ᵫ¡ÐḄÑÈÒÓÑÈ஺ÐÒÓÑÈḄÔṹÒÓÔṹo8.ᙠÖ¡×ØÙÖ¡§¨ᨵÚÛܳᐵ×஺ஹ⌱ß⚪1.ᐵ⌱ß0᪀ᑡáâA674A.if½ãelse½ãäåᡂ/æB.if½ãèéêᨵelse½ãëC.switch0᪀ÙÅcase½ãÙäåᵨbreak½ãD.switch0᪀Ùäåᨵdefault½ã2.whileíîdo…whileíîḄðñ')A.êᨵðñò0᪀¬3óôᦔ1᪵

7B.whileíî÷do…whileíî᡻%ᦔ᳛ùC.whileíîᐜíî.ᑨᡠéíîü¦ýþ᡻%ÿD.do...whileᐜᑨᡠ᡻3.ᐵforwhileḄA.whileᐜᑨ᡻forᐜ᡻ᑨ஺B.whileᑨᩩ"#$%&'forḄᑨᩩ"#($%&'C.)*+,-᎛/012ᣚD.)*&᪀5/67ᨵ09:;4.<ᑡ>⛲@5ABCDᑴFᐵḄA.privateB.publicC.protectedD.final5.voidḄGHIA.JKᨵLMNB.J:;C.KᨵOHD.VHJ-■67Xᵨ6.returnPQIA.R9SJLMᦪNB.J/67GᨵC.J51ᨵUQreturnD.09ᵨᩭLM[\7.ᐵ[\ᡂᕒᓰᵨᑁaḄA.bcḄ[\ᐳᵨbeᑁaBஹbcḄ[\Xᵨ0bḄᑁaeg☟᝱ᡂᕒᐳjkbḄᑁa;lC.[\ḄJ0ᓰᵨᑁaD.m/0[8.<ᑡA.0◤⌕VHcp9qr[\B.[\567ᨵsឋJC.sឋ1uᓫwxy1[\Dஹsឋ67uᓫwx

89.<ᑡ()Aஹ$%1ᒹGU}ᦻ"Bஹ}ᦻ"5R9ᨵcCஹ}ᦻ"51ᨵUᐳcDஹ}ᦻ"R9$%Xᵨ10.ᐵJmain()Ḅ()A.Jmain()R9ᙠᐳc5Bmain()ḄᜮVH1᪷+OᦋC.c51Kᨵmain()JD.ᡠᨵ[\Ḅqr/67ᙠmain஺J511.᪀⌼ᦪ,-ᵨ(Aஹqr[\-BஹcVH-CஹXᵨ[\ḄJ-DஹXᵨ[\Ḅsឋ-12.\JI()Aஹ1ᨵJBஹ1ᙠ(\c5CஹKᨵJḄJDஹ\c5ḄJ/\J13.ᐵḄḄIAஹc᱄cᡠᨵḄsឋJ஺Bஹc᱄cḄ(ᨵsឋJ஺CஹcR᱄cpublicJsឋDஹcR᱄cḄJ0sឋ14.ᐵ᪀⌼ᦪḄ()AஹcR9ᨵ᪀⌼ᦪBஹc1ᨵU0bḄ᪀⌼ᦪCஹ᪀⌼ᦪAcbDஹ᪀⌼ᦪ67VH09Xᵨ᱄cḄ᪀⌼ᦪ

915.thissuperIAஹ/1ᵨᙠmain஺J5Bஹ/ᢣᑁaᙢᙬCஹ09ᵨᙠmainJ5DஹOHkb16.ᐵsuperḄḄIAஹᢣ[\ḄᑁaᙢᙬBஹᢣ[\Ḅ᱄c[\ḄᑁaᙢᙬCஹᢣ[\Ḅ᱄cD^1ᵨᙠmainJ517.⌚A¡¢Ḅᐵ£Aஹ⌚Rᨵ¤¥ᙠ᱄cAc¦l¡¢1¤¥ᙠbc5B.⌚J10b¡¢J67bC.final>⛲ḄJ1⌚g09¡¢D.⌚A¡¢bM§18.ᐵ¨©Aஹª¨©67ª¨©ḄᡠᨵJB.cR9ª¨©C.¨©l09ᨵᐵ£D.¨©\cbM§19.«¬ᒹG<ᑡᑁ®A.$%᡻¯$5⍗ᑮḄ§ᐜKᨵ⚜ᧇᑮḄB.$%5ḄP┯µC.$%Ḅ¶·┯µD.m/20.[¸¹VH¯19º«¬ḄPQᙠ¶$-IAஹ67Xᵨtry/catchPQᜐᳮ«¬,ᡈᵨthrowsᐸºB.᝞'$%┯µ67Xᵨtry/catchPQᜐᳮ«¬C.1Á¦0ᳮ

10D.R9Xᵨtry/catchPQᜐᳮ21.Â@ÃAÂ⁚ÃḄÅÆᙠ()A.ὅÈᨵÉÊὅKᨵB.ὅᙽÌᑏὅÂ⁚ÌᑏC.ÎὅKᨵÅÆ1ÏᣚXᵨD.ÐÌᑏḄÂ⁚ᦪ0b22.<ᑡÃ50sÂ⁚Ã()A.FileinputStreamBBufTeredlnputStreamC.FilterlnputStreamD.InputstreamReaderÑஹ$%Ò;⚪1.publicclassSum{publicstaticvoidmain(String[]args){intj=10;System.out.println(Hjis:"+j);calculateজSystem.out.println(HAtlast,jis:”+j);)staticvoidcalculate(intj){for(inti=0;i<10;i++)j++;System.out.println(Hjincalculate()is:})Ô&':Ijis(1)jincalculate()is:(2)Atlastjis:(3)ÕᫀI(1)10(2)20(3)10o2.ᢥ⌕ØÒ;

11abstractclassSuperAbstract{voida(){...}abstractvoidb();abstractintc(inti);iinterfaceAsSuper(voidx();)abstractclassSubAbstractextendsSuperAbstractimplementsAsSuper(publicvoidb(){...}abstractStringfi();}publicclassInheritAbstractextendsSubAbstract{publicvoidx(){...}publicintc(inti){...}publicString[){}publicstaticvoidmain(Stringargs[]){InheritAbstractinstance=newInheritAbstract();instance.x();instance.a();instance.b();instance.c(lOO);System.out.println(instance.f());)ᙠmÜe$%5I\cᨵISuperAbstract(1)(ᑏc)(\cᨵ:(2)(ᑏc)¨©ᨵI(3)(ᑏ¨©)AsSuper5Ḅx()J(4)JᡠᙠInheritAbstract567[Þß(5)ÕᫀI(1)SuperAbstractà

12(2)InheritAbstractà(3)AsSuperà(4)\à(5)⌚ª஺3.ᢥáâãᡂ$%publicclassLeaf{privateinti=0;஻åsឋNᵨæçLeafincrement஺{஻VHJincrement(),LMNLeafcḄ[\i++return(1);஻[\Ḅᙢᙬè:LMNLM)voidprint(){System.out.println(Hi="+i);}publicstaticvoidmain(Stringargs[]){Leafx=(2);//qrLeafcḄ[\xx.increment().increment().increment().print();}஻UᵨJincrement஺LMḄ/xḄᙢᙬiN⊤êᵨᦪ)Ô&':i=(3)ÕᫀI(1)thisàফnewLeaf()àব34.ᢥáâíêãᡂᦻ"îᑴḄ$%//FileStream}ïṹ᝞

13FilelnputStreamfis=(1);FileOutputStreamfbs=newFileOutputStream(outFile);intc;஻⌲Â⁚ô}ᦻ"5ÔᐭöÔᑮfosÃwhile((c=fis.read())!=-1)(2);fis.close();fbs.close();)catch(Exceptione){System.out.println(HFileStreamsTest:"+e);ÕᫀI(1)newFilelnputStream(inFile);(2)fbs.write(c);5.▅Ì$%ù&'I//AbstractClassDemo.java}ïṹ᝞

14voiddisplay(){஻ª\cḄJSystem.out.println("Triangle");publicclassAbstractClassDemo{publicstaticvoidmain(Stringargs[]){(newCircle()).display();஻VHF[\ᩭᵨ[úḄdisplayJ(newRectangle()).display();(newTriangle()).display();})Ô&'ÕᫀI(1)Circleà(2)RectangleàবTriangle஺ûJAVA$%üýþ⚪ÿ-ஹ⌱⚪(⚪2ᑖᐳ40ᑖ)1.ᑡᐵjavaḄḄA.ᘤBC.☢ᔣ!ḄD.☢ᔣ"#Ḅ$2.ᑡJavaᔠ&Ḅ᪗()A.staticB.5stuC.-3eD.atm3.ᑡᐵ*+Ḅ,ḄA.ᙠJavaᐕ/01*+BJavaḄᓫ•*+45ṹ78☠C.ᙠJava:;<=>?@:;ABD.ᙠJava:;DE*+:;ᵨᑡᦪ]<^A.byteB.shortC.charD.float7.᡻`ᑡ!abTb,x,yḄcḄintx=6,y=8;booleanb;

15b=xᨵ:ᩩ\C.ᙠ":;JAVA!aJ`xḄ!8y@z{Ḅ,ᑏ┯~D.JAVA!arsᨵ:;qᦪ12^ᨵinta=l,b=2,c=3,d=4;booleanm,n;᡻`⊤gh(m=aுb)&&(n=c++>d)TcḄcoA.1B.2C.3D.413ஹJAVAḄᔠ&Ḅᐵ஺A.CharB.maxC.switchD.Default14ஹUᔜ᪗()ᔠ&Ḅᵨᡝ᪗()oA.Padஹ#abcB.bஹalOC.void>maxD.8aஹtemp15ஹᨵdoublex=2,y;ᑣ⊤ghy=x+5/2Ḅc_A.3B.4C.4.5D.4.016ஹeᨵintx=y=z=l;booleanc;ᑣ᡻`\c=Wx>0&&-y<2||—zீl;Tx,y,zḄcᑖoA.0,1,1B.0,1,0C.1,0,1D.0,0,117ஹinta=12,b;b=a>>2;ᑣbஹaḄc஺

16A.3ஹ3B.3ஹ12C.6ஹ12D.24ஹ318ஹ᡻`☢Ḅ\TxஹyஹzḄc0intx=7,y=9,z;z=(x>y)?x+y:x/y;A.7ஹ9ஹ16B.1ஹ9ஹ0C.16ஹ9ஹ16D.16ஹ16ஹ1619ஹUᐵif\Ḅ┯~,஺A.ᩩ«⊤gh8U¬Ḅ⊤ghB.ᩩ«⊤gh=>ᐵ®⊤ghᡈ°±⊤ghC.ᩩ«⊤ghḄ²OC>ḕᶍD.µelse¹"Ḅif\ᐸ»Xᨬ¼Ḅ½¹"Ḅif\21.ᑡ\aᑡ᡻`TkḄc()஺intj=8,k=15;for(inti=2;i!=j;i+=6){k++;)A.18B.15C.16D.1722.ᑡ\aᑡ᡻`TjḄc'()ointj=3,i=2;while(-i!=i/j)j=j+2;A.2B.4C.6D.523.ᑡ\aᑡ᡻`TiḄc'()ointi=0Èdo{i+=3;}while(i<10);A.3B.6C.9D.1224.ᑡ\aᑡ᡻`TkḄc'()0inti=6,j=8,k=10,n=5,m=7;if(!(i

17A.12B.0C.15D.-226.᡻`Ó☢Ḅ!abTÔÕḄop()஺charc='\0';for(c=a;c<'z';c+=3){if(c>=d')break;)System,out.printin("\''+c+"\'");A.'e'B.'f'C.'a'D.'d'27.᡻`Ó☢Ḅ!abTkḄc()஺intk=0;label:for(inti=l;i<10;i++)(for(intj=l;j<5;j++)(k+=i+j;if(j==3)breaklabel;})A.3B.9C.12D.628.᡻`Ó☢Ḅ!abTkḄc()஺intk=0;label:for(inti=l;i<3;i++)(for(intj=l;j<3;j++)(k+=i+j;System,out.println(k);if(i==2)continuelabel;})A.3B.5C.8D.1229.⊤gh(short)8/9.2*5ḄcḄ<^()஺A.shortB.intC.doubleD.float30.U⌱⚗ÛÜᙳÞjkᔠ&Ḅßc\àá஺A.a==1B.++iC.a=a+l=5D.yàintáiàiAâãᓄá31.☢ᐵJavaApplication!ao᪀ᱯé,┯~Ḅàá஺

18A.:;JavaApplication!aᵫ:;ᡈ0;ᦻ«ᡂ;ᦻ«8Ujk:;ᡈ0;<;<ᵫì;i&FÛÜᡂ஺B.Java!aíîᨵpublicx=5,y=8,ᑣ⊤NOx|yḄQR(oA.3B.13C.0D.538.>YZᨵWXfloatfl,f2=8.OF,ᑣ+ᑡḄ஺A.WXfl,f2ᙳ^_`ᓄR8.0B.WXflbᨵ^_`ᓄcf2^_`ᓄR8.0C.WXfl,f2ᙳd^_`ᓄD.WXf2bᨵ^_`ᓄcfl^_`ᓄR8.039.fgᦪijVshortḄkQm஺A.-256~255B.-32768~32767C.-128~127D.0o553540.+ᑡqrstuvḄ4w஺A.doubled=545.0:B.charal="c":C.inti=321:D.floatfl=45.Of;41.>YZᨵshorts;byteb;charc;ᑣ⊤NOs*b+cḄjVR()oA.charB.shortC.intD.byte42.+ᑡ{|4wḄ{|}ᦪ()ointi=5;do{System,out.printin(i-);i}while(i!=0);A.5B.▲C.0D.143.+☢Ḅ⊤NO-.Ḅ()A.Strings=""inti=3;s+=i;

19B.Strings="";inti=3;ifi==s{s+=i};C.Strings=""inti=3;s=i+s;D.Strings=null;inti=s!=null&&s.length0>0?s.length:0;44.+ᑡ⊤ᓝᑴ᦮ᦪḄ஺A.012345B.2008C.0xfa08D.fb0545.ᙠswitchexpression4w6cexpressionḄᦪiVqr஺A.charB.shortC.doubleD.byte46.ᢣḄ⊤NO஺A.byte=128;B.longl=0xfffL;C.Boolean=null;D.double=0.9239d;47.+☢ᐵjḄឋḄ6c┯Ḅ஺A.ᙠᨵḄfẠᡂ¡jḄ¢B.Java45⌕¤¥¦j§ᨵ¥᱄jC.᱄j6ᡂᕒḄª«ᩗ▲ᙠ¦j6^ᦋWD.¦j᱄jḄᡠᨵᡂᕒc°qᒹ²³ᨵḄᡂᕒ48.ᙠᡂᕒḄª«´ᑴµ⛲16c·Yª«ᩗ▲ᒹ¸¹jº»c¼ᒹḄᐸ¾j¿ᐸ¾ᒹḄ¹j¦jḄµ⛲1஺A.ÀÁB.protectedC.privateD.public49.ᙠjḄµ⛲16c·Y§r^¼ᒹjᡠÂᵨḄµ⛲1஺A.publicB.ÀÁC.finalD.abstract50.+ᑡᐵÄÅjḄ6c┯Ḅ஺A.ÄÅjᵨµ⛲1abstractḄB.ÄÅjqÆÇYZÈÅḄC.ÄÅjqÆÇᨵ᪀⌼ḄD.ÄÅjsË⌕ᨵÌḄ¦j51.+ᑡᐵ᪀⌼ḄÍ6c┯Ḅ஺A.᪀⌼ÎÏjÎÐÑÒ¼B.᪀⌼bᨵÓÔQcÕqᵨvoidÖC.᪀⌼§rstnewº×ØᵨD.᪀⌼qÆÇÙÚc°ÆÇ52.+☢ᐵÛÜḄ6c┯Ḅ஺A.¥j§ᐕÞ¥ÛÜB.YZÛÜÂᵨḄᐵßàinterfaceC.ᙠÛÜḄj6sË⌕áÛÜ6YZḄÄÅḄᐹãäåD.ÛÜä▭ᵫËX¿ÄÅ᪀ᡂḄᱯéj53.+ᑡ-.Ïpublicvoidaddinta{}RqᔠᳮḄÙÚA.publicvoidaddcharaB.publicintaddintaC.publicvoidaddinta,intbD.publicvoidaddfloata54.MAX_LENGTHintVpublicᡂᕒWXcWXQòᢝRËX100,ᐸYZ஺A.publicintMAX_LENGTH=100;B.finalpublicintMAX_LENGTH=100;C.publicfinalintMAX_LENGTH=100;D.finalintMAX_LENGTH=100;55ஹuvJavaApplicationõö÷ᦻùúÒûḄà⁚ṹᦻùcþ.à⁚ṹ

20ᦻùḄ᡽A1UaVaB..classCUID..exeV*=2Z=356ஹxᑣ⊤y+=z----/++xḄo=13A.B.3.5C.4D.557ஹABḄ!"#ᦪ!%&Ḅ'(method.ᑏ'(ᜮ1232ᵨAB56789:;ᵨ<1='(ᜮḄ">஺A.staticvoidmethod>B.publicvoidmethod>C.finalvoidmethod>D.abstractvoidmethod>58.JavaSEḄLMᦻOjavaஹjavacஹjavadocQ>ᡠᙠTU>஺A.%JAVA_HOME%\jreB.%JAVA_HOME%\libC.%JAVA^HOME%\binD.%JAVA_HOME%\demo59.ᙠ:_`⌱bḄᭆde1fgh☢ᔣklmnᭆdḄ>A.B.oᦪC.p᝱ὶsD.tl60.JAVAmne1intvḄᦪwxy஺A.1{⁚B.2{⁚C.4{⁚D.8{⁚~ஹ⚪1ᑖ1ᐳ10ᑖ>1.inta=8,b=6;ᑣ⊤++a-b++Ḅ3>஺2.interface>ᡠ`Ḅ1fᒹḄ⁚஺3.᪀⌼'(Ḅ'(>1e¡ᨵ£¤¥¦Ḅ᪀⌼'(1ᑣ§¨©ª«p=¬ᡂ®¯᪀⌼>'(஺4.ᙠ'(°ᑁ£¤Ḅ²³´µ²³>5.᪀⌼oᦪ>ᱯ·Ḅ'(1ᵨh¸¹Ḅº஺6.ᡂᕒḄ¼½¾ᑴÀᨵpublic>private>ஹprotected>Á®¯ÂÃ஺7.ÄÁ᱄ᙠᒹe1ᑣÄÆÇ᱄eḄpublic>protected>Á®¯>ᡂᕒ1Èᐸ5ÄḄᡂᕒ1ÊfËÆÇ᱄Ḅprivate>ᡂᕒ஺

218.Ä>ÌÍÎÏ᱄>©1Äkl9«pÐᣚ᱄kl1᱄>ÎÏÄ>©1ÒÓÈ᱄klÔᑴÐᣚÄkl஺9.Javamne1£¤Ä©12ᵨᐵÖ{extendsᩭÏØ᱄஺10.ÍÙeḄtl'(©1ÒÓ2ᵨtl>Ḅ'(ᜮ஺11.ÍÙe£¤Ḅᦪwᡂᕒᙳpublic,ᡠᨵᡂᕒ'(ᙳpublic'(1Û¡ᨵprivate'(஺12.thisÜ⊤Ý6kl>ḄÞᵨ1super⊤ßḄÝ6klḄÌÍ᱄kl஺13.᝞áᒹᡈãabstract'(1ᑣ<abstract஺14.ÍÙeËᒹpublicvḄᡂᕒ²³ÁpublicvḄᡂᕒ'(஺15.JAVAäᵨå槨Ḅçoᦪmain16ஹJAVAèᦻOḄ᡽_java,{⁚ṹḄ᡽class஺17ஹ᪗ìÀᵫ__ᑜï_$ñᜮ18>inta=6,b=5;floatc;c=a/b;ᑣcḄ__1.019>JAVAèᦻOḄᦻOÒÓòᐳóᢝõ஺20ஹö÷øù§úÀᒹû_&&__Á_ýT§úÀ—?______o21ஹᓫf,@1.56,JAVAf=1.56_F_o22ஹintx=2,y=5;booleanb;b=++x>4&++y<3,ᑣxஹyஹbḄ3_,6,false஺23>floatf=33.7;f=f%10;ᑣfḄ—3.7□ஹ▅⚪(!"⚪10ᑖ$ᐳ20ᑖ)1.'()Ḅ*+,-MessagefourIntx=0,y=4,z=5;If(x>2){If(y<5){System,out.printin(uMessageone");)Else{System,out.printin(uMessageTwo");))Elseif(z>5){System,out.printin(uMessagethree");}else{System,out.printin("Messagefour");}2.ᑏ+'(Ḅ*+,-Valueistwo._______________________________Valueisihree.Intj=2;Switch(j){

22Case2:System,out.printin("Valueistwo.");Case2+1:System,out.println("Valueisthree.");Break;Default:System.out.println(uValueis"+j);Break;3.ᑏ+'(Ḅ*+,-*********For(inti=l;i<=5;i++)For(intj=l;j<=i;j++)System.out.print("*");System,out.println("");}4.(ᑡWXY$*+Ḅ,-Z56publicclassTest{publicstaticvoidmain(String[]args){intc=5;System,out.printin(c);System.out.printin(c++);System,out.printin(c);5.(ᑡWXY$*+Ḅ,-Z_i>8_publicclassIfelse{publicstaticvoidmain(String[]args){inti=9;if(i<3)System,out.printin("i<3");elseif(i<8)System,out.println(u38");)

236.(ᑡWXY$*+Ḅ,-ZdefaultZeroOnepublicclassBase{publicstaticvoidmain(StringE]args){inti=4;switch(i){default:System,out.print("default");case0:System.out.print("Zero”);case1:System,out.print(^Onew);break;case2:System,out.print(“Two”);))pஹ⚪(!⚪15ᑖ$ᐳ30ᑖ)1ஹqᑏ+r᦮Ḅtṹ$v$vwTest,x1ᑮ10Ḅ▤{PublicTest{Publicstaticvoidmain(String[]argv){Longresult=1;For(inti=1;i<=10;i++){result=result^i~)System,out.println("1ᑮ10Ḅ▤{Z"+result);))2ஹqᑏ+r᦮Ḅtṹ$vwTest,ᑭᵨforᡭᓺ{⊤஺PublicTest{Publicstaticvoidmain(String[]argv){Longresult=1;For(inti=l;i<=9;i++){For(intj=l;j<=i;j++){result=i*j;System,out.print(i+?,*”+j+“"+result+“\t”)~)System.out.printin("”)~))3ஹqᑏ+r᦮Ḅtṹ,vwTest,x1+2+3+……100Ḅ᜻ᦪḄ

24PublicTest{Publicstaticvoidmain(String[]argv){Longresult=1;For(inti=1;i<=100;i++){if(i%2=0)continue;result=result+i;}System,out.println(rtlᑮ100᜻ᦪḄZ:“+result);))4.ᑏApplication,x+1—100publicclassabc{publicstaticvoidmain(String[]args){for(inti=l,sum=0;i<=100;i++)sum+=i;System,out.printIn("sum="+sum);))5.ᑏApplication$1-100ḄᏔᦪ*+publicclassFor{publicstaticvoidmain(String[]args){for(inti=l;i<=100;i++){if(i%2!=0)continue;System,out.printIn("Ꮤᦪ”+i);}}6.vtable,vᨵw$$☢¢$£¤¥ឋ$§ᨵ'(¨©஺(1)᪀⌼©¬ᓄᡠᨵᡂᕒ(2)area():²³☢ᙢ☢µ(3)display():ᙠ·¸¹*+ᡠᨵᡂᕒḄ(4)changeweight(intw):ᦋᙠmain஺©»¼$²³☢ᙢ☢µ$ᦋ$

25ᙠ·¸¹*+ᡠᨵᙢ¥ឋpublicclasstable{privateStringname;privateintweight;privateintlength;privateintwidth;privateintheight;publictable()(name="”~weight=100;length=10;width=10;height=10;}publicvoiddispaly()(System.out.print(”name="+name+"weight="+weight+“length="+length+"width=”+width+”height="+height+“

26”)~)intarea(){intarea;area=length*width;returnarea;)voidchangeweight(intw)(weight=w;//returnweight;publicstaticvoidmain(String[]args){//TODOAuto-generatedmethodstubtableta=newtable();ta.dispaly();intx;x=ta.area();System.out.print("☢µ="+x+"

27")~ta.changeweight(l0);ta.dispaly();

28ூ1௃⚪¿ÀᐺÂ⚪ᨵ»ᐢ$Ä+ÅYÆ3ᨴÈ!ᨴÉÅ»ᐢ$"ᐢ£ᑮÆᨴY!ᨴÊÅ»ᐢ$Ꮇ᝞ᐢÉÍÎ$Â!ᨴḄᐢÏᦪÐÑÒ஻ÔZÕÖ×᜿ᦪᑡÂ⚪publicclasslianxiOl{publicstaticvoidmain(String[]args){System.out.println("Æ1ᨴḄᐢ»ᦪ1");System.out.println("M2ᨴḄᐢ»ᦪ1");intfl=l,f2=l,f,M=24;fbr(inti=3;i<=M;i++){f=f2;f2=fl+f2;fl=f;System.out.println("M"+i+"ᨴḄᐢ»ᦪ"+f2);ூ2௃⚪¿ᑨÚ101-200ᨵÐÑÛᦪ$*+ᡠᨵÛᦪ஺ᑖ᪆ᑨÚÛᦪḄ©ᵨᦪᑖÝÞ◀2ᑮsqrt(Ôᦪ)$᝞-àá᦮◀$ᑣ⊤âãᦪÍZÛᦪ$äZÛᦪ஺publicclasslianxi02{publicstaticvoidmain(String[]args){intcount=0;for(inti=101;i<200;i+=2){booleanb=false;fbr(intj=2;j<=Math.sqrt(i);j++)(if(i%j==0){b=false;break;}else{b=true;})if(b=true){count++~System.out.println(i);})System.out.println("ÛᦪᦪZ"+count);})ூ3௃⚪¿ᡭᓺ+ᡠᨵḄ"åæçᦪ",ᡠè"åæçᦪ"Zᢣêᦪ$ᐸᔜêᦪíî©ïðᦪñò஺ó᝞153Z"åæçᦪ"$ô153=1Ḅõ©+5Ḅõ©+3Ḅõ©஺publicclasslianxi03{publicstaticvoidmain(String[]args){

29intbl,b2,b3;fbr(intm=101;m<1000;m++){b3=m/100;b2=m%100/10;bl=m%10;if((b3*b3*b3+b2*b2*b2+bl*bl*bl)=m){System.out.println(m+”Zåæçᦪ");}ூ4௃⚪¿ö÷᦮ᦪᑖøùôᦪ஺ó᝞*ᐭ90,ᡭᓺ+90=2*3*3*5஺ᑖ᪆»nûXᑖøùôᦪ$üᐜþᑮᨬḄᦪk,ᯠᢥᡂ(1)᝞ᦪាn,ᑣᑖᦪḄ!ᡭᓺ$ᓽ&஺(2)᝞nv>k,(n)*k᦮◀!ᑣ-ᡭᓺ$kḄ.!/ᵨn◀1kḄᖪ!345Ḅ6᦮ᦪ7n,89᡻;<=஺(3)᝞n>)*k᦮◀!ᑣᵨk+134kḄ.!89᡻;<=஺importjava.util.*;publicclasslianxi04{publicstaticvoidmain(String[]args){Scanners=newScanner(System.in);System.out.print("ABᐭ=6᦮ᦪ”)Fintn=s.nextlnt();intk=2;System.out.print(n+);while(k<=n){ififk==n){System.out.println(n);break;}elseif(n%k==0){System.out.print(k+"*");n=n/k;}elsek++;ூH5௃⚪KᑭᵨᩩNOPQḄRᝅᩭᡂU⚪VWᡂX>=90ᑖḄYVᵨA⊤[,60-89ᑖ]^ḄᵨB⊤[!60ᑖ1ḄᵨC⊤[஺importjava.util.*;publicclasslianxi05{publicstaticvoidmain(String[]args){intx;chargrade;Scanners=newScanner(System.in);System.out.print("A_ᐭ•ᡂX”)Fx=s.nextlntQ;

30grade=x>=90?'A':x>=60?B:cSystem.out.printin("b4H+grade);)}ூH6௃⚪K_ᐭd6᦮ᦪmen,fᐸᨬᜧjkᦪeᨬjlᦪ஺/**ᙠpqr!s⌕◀ᦪ>0,ᵨuᜧᦪ◀1uḄᦪ!vḄ=ᦪ34wpqḄᜧᦪ!xyḄzᦪ34=•wpqḄuḄᦪ!᝞Upq{ᑮuḄᦪḄ.40,}~uᜧḄᦪ!Uᦪᓽ4ᨬᜧjkᦪ!ᨬjlᦪ4dᦪ]◀1ᨬᜧjkᦪ஺*/importjava.util.*;publicclasslianxi06{publicstaticvoidmain(String[]args){inta,b,m;Scanners=newScanner(System.in);System.out.print(”Bᐭ=᦮ᦪn);a=s.nextlnt();System.out.print(”Bᐭ=᦮ᦪ)b=s.nextlnt();deffcd=newdeffi();m=cd.dea,b);intn=a*b/m;System.out.printin("ᨬᜧjkᦪ:"+m);System.out.printin("ᨬjlᦪ:"+n);)}classdefF{publicintdeff(intx,inty){intt;iRx

31returnx;)ூH7௃⚪K_ᐭ=;Q!ᑖ$ᐸrᦻஹஹᦪeᐸQḄᦪ஺importjava.util.*;publicclasslianxi07{publicstaticvoidmain(String[]args){intdigital=0;intcharacter=0;intother=0;intblank=0;char[]ch=null;Scannersc=newScanner(System.in);Strings=sc.nextLinef);ch=s.toCharArray();for(inti=0;i=*0*&&chv=9){digital++;}elseif((ch>=&&ch<=*/)||ch>A&&ch<=Z){character++;}elseif(ch=**){blank++;}else{other-H-;))System.out.printin("ᦪᦪ:+digital);System.out.printin("ᦻᦪ:+character);System.outprintln("ᦪ:”+blank);System,out.printin("ᐸQᦪ:+other);}}ூH8௃⚪Kfs=a+aa+aaa+aaaa+aa...aḄ.!ᐸra=ᦪ஺᝞2+22+222+2222+22222(Uᐳᨵ5ᦪ)!ᦪᨵBᑴ஺importjava.util.*;publicclasslianxi08{publicstaticvoidmain(String[]args){longa,b=0,sum=0;Scanners=newScanner(System.in);System.outprint("_ᐭᦪaḄ.")Fa=s.nextlnt();

32System.out.print("_ᐭḄ⚗ᦪ”)Fintn=s.nextlnt();inti=0;while(i

33ூH11]⚪Kᨵ1ஹ2ஹ3ஹ4¿ᦪ!)Àᡂº»Á>YÂÃ89ᦪḄÄÅᦪ?Ǻ»¼publicclasslianxil1{publicstaticvoidmain(String[]args){intcount=0;fbr(intx=l;x<5;x++){for(inty=l;y<5;y++){fbr(intz=l;z<5;z++){if(x!=y&&y!=z&&x!=z){count++;System.out.println(x*100+y*10+z);System.out.println("ᐳᨵ"+count+"ÄÅᦪ");)}ூH12]⚪KÈÉÊËḄᝄÍ᪷ÏᑭÐÑᡂ஺ᑭÐ(I)Òᡈ10Ôᐗ!ᝄÍ&Ñ10%FᑭЮ10Ôᐗ!Ò20Ôᐗ!Ò10ÔᐗḄÖᑖᢥ10%Ñᡂ!®10ÔᐗḄÖᑖ!&&Ñᡂ7.5%F20Ôᑮ40Ô]^!®20ÔᐗḄÖᑖ!&Ñᡂ5%F40Ôᑮ60Ô]^®40ÔᐗḄÖᑖ!&Ñᡂ3%F60Ôᑮ100Ô]^!®60ÔᐗḄÖᑖ!&Ñᡂ1.5%,®100Ôᐗ!×100ÔᐗḄÖᑖᢥ1%Ñᡂ!¬B_ᐭØᨴᑭÐ!f-ÊËᝄÍÚᦪ¼importjava.util.*;publicclasslianxil2{publicstaticvoidmain(String[]args){doublex=0,y=0;System.out.print("_ᐭØᨴᑭÐ(Ô)")FScanners=newScanner(System.in);x=s.nextlnt();if(x>0&&x<=10){y=x*0.1;}elseif(x>10&&x<=20){y=10*0.1+(x-10)*0.075;}elseif(x>20&&x<=40){y=10*0.1+10*0.075+(x-20)*0.05;}elseif(x>40&&x<=60){y=10*0.1+10*0.075+20*0.05+(x-40)*0.03;}elseif(x>60&&x<=100){y=20*0.175+20*0.05+20*0.03+(x-60)*0.015;}elseif(x>100){

34y=20*0.175+40*0.08+40*0.015+(x-100)*0.01;)System.out.println("-ÛÑxḄᝄÍ"+y+"Ô!');)}ூH13]⚪K=᦮ᦪ!Ý100=ᐰßàᦪ!Ý168á=ᐰßàᦪ!AâÛᦪº»¼publicclasslianxil3{publicstaticvoidmain(String[]args){for(intx=1;x<100000;x++){if(Math.sqrt(x+100)%1=0){if(Math.sqrt(x+268)%1==0){System.out.println(x+"100=ᐰßàᦪ!168á=ᐰßàᦪ")F)))})/*ᢥ⚪ãpq-Û¬-100äå(᦮ᦪᒹç6᦮ᦪஹè᦮ᦪஹé)!᪵ëº=ìíᩩNḄᦪ-99஺(ᡃïᑮᜧÖᑖð⍝⚪KÇò⚪rḄ᦮ᦪ”ᳮᡂ6᦮ᦪ!ᡃô£õᜧö÷஺*/ூH14]⚪K_ᐭøùøᨴøú!ᑨü=ᜩ=ùḄ<ᜩ¼importjava.util.*;publicclasslianxil4{publicstaticvoidmain(String[]args){intyear,month,day;intdays=0;intd=0;inte;inputfymd=newinput();do{e=0;System.out.print("_ᐭù");year=fymd.input();System.out.print("_ᐭᨴ");month=fymd.input();System.out.print("_ᐭᜩ");day=fymd.input();if(year<0||month<0||month>12||day<0||day>31){

35System.out.println("_ᐭ┯ÿᐭ”);e=l;}}while(e==l);for(inti=l;i

36⚪ᐭ᦮ᦪx,y,z,!ᦪᵫ#ᑮᜧ&஺importjava.util.*;publicclasslianxil5{publicstaticvoidmain(String[]args){inputfhc=newinput();intx=0,y=0,z=0;System.out.print("ᐭ'ᦪ(");x=fhc.input();System,outprint(”ᐭ+ᦪ(”);y=fhc.input();System.out.print("ᐭᦪ(:")z=fhc.input();if(x>y){intt=x;x=y;y=t;}iRx>z){intt=x;x=z;z=t;)if(y>z){intt=y;y=z;z=t;)System.out.println("ᦪ(ᵫ#ᑮᜧ᣸ᑡ/"+x+""+y+""+z);))classinput{publicintinput(){intvalue=0;Scanners=newScanner(System.in);value=s.nextlnt();returnvalue;})ூ16]⚪&9*901஺publicclasslianxil6{publicstaticvoidmain(String[]args){fbr(inti=l;i<10;i++){for(intj=l;j<=i;j++){

37System.out.print(j++i+"="+j*i+"");if(j*i?@ABCᔛ='+ᜩDEBFᒕ8Ḅ᪻3ᔛᣵ'>BCᔛ='஺IJKᜩDELᔛ=M'ᜩᒕ8Ḅ'>N'஺ᑮ10ᜩDEOPᔛQRSᒕ8'᪻3=஺T'ᜩᐳ᤺=CV஺publicclasslianxil7{publicstaticvoidmain(String[]args){intx=1;for(inti=2;i<=10;i++){x=(x+l)*2;)System.out.printin("Ღ3'ᜩ᤺="+x+"᪻3");))ூ18]⚪WXYᳫ[\]^_ᔜ&a஺ᵬ[/a,b,cac[/x,y,za஺defgh^_iᓫ஺ᨵaᔣ[ᕒᡭo^_Ḅiᓫ஺apq@rx^cpq@rx,z^st&[_uḄiᓫ஺publicclasslianxil8{staticchar[]m={;staticchar[]s=-N};publicstaticvoidmain(String[]args){for(inti=0;i

38ூ19]⚪ᡭᓺ&᝞8xᫀ(z{)********publicclasslianxil9{publicstaticvoidmain(String[]args){intH=7,W=7;஻}r~Ḅ᜻ᦪfor(inti=0;i<(H+l)/2;i-H-){fbr(intj=0;j

39t=y;y=xx=y+1;}System.out.printlnC'M20⚗r”+sum);)}ூ21]⚪:T1+2!T!++20!Ḅrpublicclasslianxi21{publicstaticvoidmain(String[]args){longsum=0;longfac=1;for(inti=l;i<=20;i-H-){fac=fac*i;sum+=fac;fSystem.out.println(sum);})ூ22]⚪ᑭᵨ⌴T5!஺publicclasslianxi22{publicstaticvoidmain(String[]args){intn=5;recfr=newrec();System.out.println(n+n!=n+fr.rec(n));)}classrec{publiclongrec(intn){longvalue=0;if(n=l){value=1;}else{value=n*rec(n-l);}returnvalue;})ூ23]⚪ᨵ5aᙶᙠ'6aCVqp^4aᜧ2஺64aᦪqp^3aᜧ2஺6aBp^2aᜧW஺62ap^'aᜧW஺ᨬJ6'aqp10஺6aC

40ᜧpublicclasslianxi23{publicstaticvoidmain(String[]args){intage=10;fdr(inti=2;i<=5;i++){age=age+2;}System.out.println(age);ூ24]⚪'@C5Ḅ᦮ᦪ⌕T'ஹT¡¢ᦪ+ஹ⌮ᡭᓺ&ᔜᦪ(஺஻¤ᵨ=¥᦮¦ᨬCᐭ18importjava.util.publicclasslianxi24{publicstaticvoidmain(String[]args){Scanners=newScanner(System,in);System.out.print(஻ᐭ'᦮ᦪ஻)longa=s.nextLongO;Stringss=Long.toString(a);char[]ch=ss.toCharArray();intj=ch.length;System,out.println(a+஻'஻+j+஻ᦪ஺஻)System,out.print(஻ᢥ⌮&஻);for(inti=j-l;i>=0;i—){System,out.print(ch[i]);)))ூ25]⚪'5ᦪᑨС@Ñᦻᦪ஺ᓽ12321ÑᦻᦪÔÕÖ,ᓝÔᓟÖ஺importjava,util.*;publicclasslianxi25{publicstaticvoidmain(String[]args){Scanners=newScanner(System,in);inta;do(System.out.print(஻ᐭ'5᦮ᦪ஻);a=s.nextlnt();}while(a<10000||a>99999);Stringss=String.valueOf(a);

41char[]ch=ss.toCharArray();if(ch[0]==ch[4]&&ch[l]==ch[3]){System,out.printin(஻'Ñᦻᦪ஻);}else{System.out.printin(஻@'Ñᦻᦪ")}})஻Þß@▲ᦪimportjava.util.publicclasslianxi25a(publicstaticvoidmain(String[]args){Scanners=newScanner(System,in);booleanis=true;System.out.print(஻ᐭ'᦮ᦪ஻)longa=s.nextLongO;Stringss=Long.toString(a);char[]ch=ss.toCharArray();intj=ch.length;for(inti=0;i

42System.out.printin(஻ᐭãäḄ+(å஻)charch2=tw.getChar();if(ch2=='U'){System,out.printin(BzTuesday/z);}elseif(ch2=='H'){System.out.printin(/BThursdayB/);}else{System,out.printin(஻óôᑏ஻))}break;case'S':{System,out.printin(஻ᐭãäḄ+(å஻);charch2=tw.getChar();if(ch2=='U'){System,out.printin("Sunday");}elseif(ch2=='A'){System.outFprintin("Saturday");}else{System,out.printin(஻óôᑏ!”);))Gbreak;default:System,out.printin(஻óõᓃᑏ!”);}))classgetChar{publicchargetChar(){Scanners=newScanner(System,in);Stringstr=s.nextLine();charch=str.charAt(0);if(chBZ'){System.out.printin(஻ᐭ┯øᐭ஻)Gch=getChar();)returnch;))ூ27]⚪T100ᑁḄúᦪ஻¤ᵨ◀sqrt(n)ḄT&Ḅúᦪ@ᒹý2r3publicclasslianxi27{publicstaticvoidmain(String[]args){booleanb=false;System,out.print(2+஻஻);System,out.print(3+஻஻);for(inti=3;i<100;i+=2){for(intj=2;j<=Math.sqrt(i);j++){

43if(i%j=0){b=false;break;}else{b=true;})if(b==true){System,out.print(i+஻஻);})))஻ÿᵨ◀1ᦪ2ᦔ᳛ᵨឋ஺publicclasslianxi27a{publicstaticvoidmain(String[]args){int[]a=newint{2,3,5,7};for(intj=0;j<4;j++)System,out.print(a[j]+஻஻);booleanb=false;for(inti=ll;i<100;i+=2){for(intj=0;j<4;j++){if(i%a[j]==0){b=false;break;}else{b=true;})if(b==true){System,out.print(i+஻஻);}ூ28]⚪FGH10IᦪJ᣸importjava.util.publicclasslianxi28{publicstaticvoidmain(String[]args){Scanners=newScanner(System,in);int[]a=newint[10];System.out.printingLMᐭ10I᦮ᦪG஻);for(inti=0;i<10;i++){a[i]=s.nextlnt();)for(inti=0;i<10;i++){for(intj=i+l;j<10;j++){if(a[i]>a[j]){intt=a[i];a[i]=a[j];a[j]=t;

44for(inti=0;i<10;i++){System,out.print(a[i]+"");),))ூ29]⚪FGSTI3*3V▣HXYᐗ[\importjava.util.*;publicclasslianxi29{publicstaticvoidmain(String[]args){Scanners=newScanner(System,in);int[][]a=newint[3][3];System,out.printin(”LMᐭ9I᦮ᦪG”)^for(inti=0;i<3;i++){for(intj=0;j<3;j++){a[i][j]=s.nextlnt();))System.out.printin("MᐭḄ3*3V▣`:");for(inti=0;i<3;i++){for(intj=0;j<3;j++){System.out.print(a[i][j]+"");),System,out.printin();)intsum=0;for(inti=0;i<3;i++){for(intj=0;j<3;j++){if(i==j){sum+=a[i][j];))}System.out.printin("HXY[\`G"+sum);))ூ30]⚪FGᨵTIcd᣸eḄᦪf஺gMᐭTIᦪ⌕SᢥjᩭḄlmnopᐭᦪfq஺஻rsetᨵᵨᢚvwxpᐭimportjava.util.publicclasslianxi30{publicstaticvoidmain(String[]args){int[]a=newint[]{1,2,6,14,25,36,37,55};

45int[]b=newint[a.length+1];inttl=0,t2=0;inti=0;Scanners=newScanner(System,in);System.out.print(஻LMᐭTI᦮ᦪG஻);intnum=s.nextlnt();if(num>=a[a.length-1]){b[b.length-1]=num;for(i=0;i=a[i]){b[i]=a[i];}else{b[i]=num;break;))for(intj=i+l;j

46System,out.print(a[j]+zB");)System.out.println("

47ᦪf⌮M{G”)Gfor(j=i-2;j>=0;j=j-l){System,out.print(a[j]+zB");)))ூ32]⚪FGTI᦮ᦪaḄ4T7஺importjava.util.*;publicclass1ianxi32{publicstaticvoidmain(String[]args){Scanners=newScanner(System,in);System.out.print("LMᐭTI7Ḅ}᦮ᦪG”);longa=s.nextLong();Stringss=Long.toString(a);char[]ch=ss.toCharArray();intj=ch.length;if(j<7){System,out.printin("Mᐭ┯”)G}else{System.out.printin(zBḄ4~7`GBz+ch[j-7]+ch[j-6]+ch[j-5]+ch[j-4]);}))ூ33]⚪FGᡭᓺ{ᩰX(⌕Sᡭᓺ{10᝞)11112113311464115101051publicclasslianxi33{publicstaticvoidmain(String[]args){inta=newint[10][10];for(inti=0;i<10;i++){a[i][i]=1;a[i][0]=1;for(inti=2;i<10;i++){for(intj=l;j

48a[i][j]=a[i-l][j-1]+a[i-l][j];for(inti=0;i<10;i++){for(intk=0;k<2*(10-i)-l;k++){System,out.print(஻”);),for(intj=0;j<=i;j++){System,out.print(a[i][j]+஻஻);)System,out.printlnO;ூ34]⚪FGMᐭ3Iᦪa,b,c,ᢥᜧM{஺importjava.util.Scanner;publicclasslianxi34{publicstaticvoidmain(String[]args){Scanners=newScanner(System,in);System,out.printingLMᐭ3I᦮ᦪG”);inta=s.nextlnt();intb=s.nextlnt();intc=s.nextlnt();if(a

49⚪FGMᐭᦪfᨬᜧḄ£¤TIᐗ¥ᣚᨬḄ£ᨬ§TIᐗ¥ᣚM{ᦪf஺importjava.util.publicclasslianxi35{publicstaticvoidmain(String[]args){intN=8;int[]a=newint[N];Scanners=newScanner(System,in);intidxl=0,idx2=0;System.out.printin(஻LMᐭ8I᦮ᦪG஻);for(inti=0;imax){max=a[i];idxl=i;)if(a[i]

50¥ᣚ§ḄᦪfG஻);for(inti=0;i

51[36]⚪FGᨵnI᦮ᦪᐸ®☢ᔜᦪᔣ§²mI³ᨬ§mIᦪ´ᡂᨬ®☢ḄmIᦪimportjava.util.Scanner;publicclasslianxi36{publicstaticvoidmain(String[]args){intN=10;int[]a=newint[N];Scanners=newScanner(System,in);System.out.printIn(஻LMᐭ10I᦮ᦪG஻);for(inti=0;i

52LMᐭᔣ§²¶ḄᦪG஻);intm=s.nextlnt();int[]b=newint[m];for(inti=0;i=m;iT){a[i]=a[i-m];)for(inti=0;i

53boolean[]arr=newboolean[n];for(inti=0;i1){if(arr[index]==true){countNum++;if(countNum==3){countNum=0;arr[index]=false;leftCount--^))index++;if(index==n){index=0;))for(inti=0;i

54᜻ᦪÙÚᵨÈᦪ1/1+1/3+...+l/n(ᑭᵨᢣ┐Èᦪ)஻tᨵᑭᵨᢣ┐Èᦪimportjava.util.publicclasslianxi39{publicstaticvoidmain(String[]args){Scanners=newScanner(System,in);System,out.print(஻LMᐭTI}᦮ᦪn=");intn=s.nextlnt();System,out.printin(஻àáᦪᑡḄ\G஻+sum(n));)publicstaticdoublesum(intn){doubleres=0;if(n%2==0){for(inti=2;i<=n;i+=2){res+=(double)1/i;)}else{for(inti=l;i<=n;i+=2){res+=(double)1/i;)}returnres;})ூ40]⚪FGÉÊË᣸஺publicclasslianxi40{publicstaticvoidmain(String[]args){intN=5;Stringtemp=null;String[]s=newString[N];s[0]="matter”;s[l]="state”;s[2]="solid”;s[3]="liquid”;s[4]=஻gas஻;for(inti=0;i

55for(inti=0;is2.charAt(i)){result=false;break;}elseif(si.charAt(i)

56i=m;if(count==4){System,out.printin("ᨵ᪻"+j+"")7break;}ூ?@42]⚪CD809*??=800*??+9*??+lᐸI?J⊤ḄLMᦪ,8*??ḄOPQLMᦪ,9*??ḄOPQ3Mᦪ஺T??J⊤ḄLMᦪU809*??VḄOP஺஻⚪C┯YZ809x=800x+9x+l[᪵Ḅ]?^_஺`ᣵb1cᨵ_Y஺publicclass1ianxi42{publicstaticvoidmain(String[]args){inta=809,b,i;for(i=10;i<13;i++){b=i*a;if(8*i<100&&9*i>=100)System,out.printin("809*"+i+"="+"800*"+i+"+"+”9*"+i+"="+b);}))ூ?@43]⚪CDT0—7ᡠklᡂḄ᜻ᦪᦪ஺//lᡂ1Mᦪo4஺஻lᡂ2Mᦪo7*4஺஻lᡂ3Mᦪo7*8*4஺஻lᡂ4Mᦪo7*8*8*4஺//.....publicclass1ianxi43{publicstaticvoidmain(String[]args){intsum=4;intj;System.out.printin("lᡂ1Mᦪo"+sum+”");sum=sum*7;System.out.printin("lᡂ2Mᦪo"+sum+"")7for(j=3;j<=9;j++){sum=sum*8;System,out.printin("lᡂ"+j+'Mᦪo"+sum+"")7[?@44]⚪CDqᏔᦪsk⊤tQLuᦪvw஺஻ᵫyᵨ◀sqrt(n)Ḅ]}T~Ḅuᦪᒹ2w3,஻ᙠᑨoᔲouᦪ?@IQYq30

57importjava.util.publicclasslianxi44{publicstaticvoidmain(String[]args){Scanners=newScanner(System,in);intn,i;do{System,out.print(஻ᐭqᜧyy6ḄᏔᦪD஻)7n=s.nextlnt();}while(n<6||n%2!=0);஻ᑨᐭoᔲo>66Ꮤᦪoᐭfunfc=newfun();for(i=2;i<=n/2;i++){if((fc.fun(i))==l&&(fc.fun(n-i)==l)){intj=n-i;System.out.println(n+Bz=஻+i+஻+஻+j);)஻~ᡠᨵkḄuᦪ)))classfun{publicintfun(inta)஻ᑨoᔲouᦪḄᦪ(inti,flag=0;if(a==3){flag=l;return(flag);}for(i=2;i<=Math.sqrt(a);i++){if(a%i==0){flag=0;break;}elseflag=l;}return(flag);஻ouᦪ,0,ouᦪ,1))஻_}6importjava.util.publicclasslianxi44{publicstaticvoidmain(String[]args){Scanners=newScanner(System,in);intn;do{System,out.print(஻ᐭqᜧyy6ḄᏔᦪD஻)7n=s.nextlnt();}while(n<6||n%2!=0);஻ᑨᐭoᔲo>66Ꮤᦪoᐭfor(inti=3;i<=n/2;i+=2){if(fun(i)&&fun(n-i)){System.out.println(n+zB=஻+i+஻+஻+(n—i));)஻~ᡠᨵkḄuᦪ

58staticbooleanfun(inta){஻ᑨoᔲouᦪḄᦪbooleanflag=false;if(a==3){flag=true;return(flag);}for(inti=2;i<=Math.sqrt(a);i++){if(a%i==0){flag=false;break;}elseflag=true;}return(flag);))ூ?@45]⚪CDᑨquᦪk9᦮◀஻⚪C┯Yᔳk9᦮◀ḄcouᦪYZᡠᦋᡂ᦮ᦪY஺importjava.util.publicclasslianxi45{publicstaticvoidmain(String[]args){Scanners=newScanner(System,in);System.out.print(஻ᐭq᦮ᦪD஻)Gintnum=s.nextlnt();inttmp=num;intcount=0;for(inti=0;tmp%9==0;){tmp=tmp/9;count++;)System,out.println(num+/zk஻+count+஻9᦮◀஺஻)7})ூ?@46]⚪CDL¡¢?@importjava,util.*;publicclasslianxi46{publicstaticvoidmain(String[]args){Scanners=newScanner(System,in);System,out.print(஻ᐭqD஻)7Stringstrl=s.nextLine();System,out.print(஻£ᐭqD஻)7Stringstr2=s.nextLine();Stringstr=strl+str2;System,out.printin(஻¡¢VḄoD஻+str);ூ?@47]

59⚪CD¤¥7ᦪ(1-50)Ḅ᦮ᦪ§¨¤¥q§?@ᡭᓺ~«§ᦪḄ*Oimportjava.util.publicclasslianxi47{publicstaticvoidmain(String[]args){Scanners=newScanner(System,in);intn=l,num;while(n<=7){do(System.out.print(஻ᐭq1--50v¯Ḅ᦮ᦪD஻);num=s.nextlnt();}while(num50);for(inti=l;i<=num;i++){System,out.print(஻*஻)7)System,out.printlnO;n++;)}}ூ?@48]⚪CD²³´µᵨ³ᵨᵯ·¸⌴ᦪºᦪºo»MḄ᦮ᦪᙠ¸⌴¼?Io½Ḅ½¾ᑣ᝞ÁD¨MᦪÂ5,ᯠVᵨw◀10ḄÄᦪJÅ«ᦪ£ÆÇqMwÇ»MÈᣚÇ6MwÇÊMÈᣚ஺importjava.util.publicclasslianxi48{publicstaticvoidmain(Stringargs[]){Scanners=newScanner(System,in);intnum=0,temp;do{System,out.print(஻ᐭq4MË᦮ᦪD஻)7num=s.nextlnt();}while(num<1000||num>9999);inta[]=newint[4];a[0]=num/1000;஻¥ᓟMḄᦪa[l]=(num/100)%10;஻¥ÍMḄᦪa[2]=(num/10)%10;஻¥ᓝMḄᦪa[3]=num%10;஻¥MḄᦪfor(intj=0;j<4;j++)(a[j]+=5;a[j]%=10;)for(intj=0;j<=l;j++)

60temp=a[j];a[j]=a[3-j];a[3-j]=temp;}System,out.print(஻½VḄᦪQD஻)7for(intj=0;j<4;j++)System.out.print(a[j]);))ூ?@49]⚪CDÏÐI~ÑḄÒᦪimportjava.util.publicclasslianxi49{publicstaticvoidmain(Stringargs[J){Scanners=newScanner(System,in);System,out.print(஻ᐭD஻)7Stringstrl=s.nextLine();System,out.print(஻ᐭD஻)7Stringstr2=s.nextLine();intcount=0;if(strl.equals||str2.equals(஻஻))System,out.printinÕ஻Ö×ᨵᐭᡈ^}ÙÚZ஻Û7System,exitÕ0Û;elsefor(inti=0;i<=strl.length()-str2.length();i++)if(str2.equals(strl.substring(i,str2.length()+i)))஻[ÜÙ}ᨵ⚪ÝÞ஻aaa஻ßᡂᨵ2஻aa஻஺count++;ÛSystem,out.printinÕ஻ᙠI~ÑD஻+count+஻Ò”Û7}Û}[?@50]⚪CDᨵàáâ¨áâᨵ3ãäḄᡂåæçèᐭᦪºÕᒹáâéêëÊãäᡂåÛÏÐ~ìᙳᡂåÞᨵḄᦪºwÏÐ~Ḅìᙳᑖᦪïðᙠñèᦻó஻stud஻I஺importjava.io.importjava,util.*;

61publicclasslianxi50{publicstaticvoidmain(String[]args){Scannerss=newScanner(System,in);Stringôôa=newString[5][6];for(inti=l;i<6;i++){System,out.print(஻ᐭÇ஻+i+஻áâḄáéD஻);a[i-l][0]=ss.nextLineO;System,out.print(஻ᐭÇ஻+i+஻áâḄêëD஻);a[i'l][1]=ss.nextLineO7for(intj=l;j<4;j++){System,out.print(஻ᐭ«áâḄÇ஻+j+஻ᡂåD஻)7[j+1]=ss.nextLine();)System,out.printin(஻

62஻);)஻ÁÏÐìᙳᑖfloatavg;intsum;for(inti=0;i<5;i++){sum=0;for(intj=2;j<5;j++){sum=sum+Integer,parselnt(a[i][j]);)avg=(float)sum/3;a[i][5]=String.valueOf(avg);)஻ÁᑏñèᦻóStringsi;try(Filef=newFile(஻C:\\stud஻)7if(f.exists()){System,out.printin("ᦻóïᙠ஻);}else{System,out.printin(஻ᦻóïᙠËᙠûüᦻó஻)7f.createNewFileO;஻ïᙠᑣûü)BufferedWriteroutput=newBufferedWriter(newFileWriter(f));for(inti=0;i<5;i++){for(intj=0;j<6;j++){sl=a[i][j]+஻\r

63஻!output,write(sl);output,close();

64System,out.printin("ᦪ*+ᑏᐭc.ᦻ0stud12”)!}catch(Exceptione){e.printStackTrace();}))JAVA=>?@ABὃDD⚪FGᑖIᫀKஹᓫ⌱⚪O(P⚪1ᑖ)Rᑡᔜ⚪A)ஹB)ஹC)ஹD)WX⌱⚗1Z[ᨵKX⌱⚗]^_ḄZab^_⌱⚗Ḅ᪗dᑏᙠ⚪fgḄhiᑁ஺1.Rᑡ=l@ᑡ᡻ngZkḄo](B)஺intm=3,n=6,k=0;whi1e((m++)<(—n))++k;A)0B)1C)2D)32.AiஹjsinttuvwZasinttᦪxwZyR⌱⚗1Z^_Ḅzo=l](BA)i=i+2B)a[0]=7;C)i++——j;D)a(0)=66;3.Java=>Ḅ}~Ḅᐵ](B)஺A)ḄB)ᓫḄC)?ḄD)4.Aᨵinti=6ᑣ᡻nyR=lgZiḄos(C)஺i+=i-1;A)10B)121C)11D)1005.Rᑡ⌱⚗1Zᵨᙠ}᱄}wḄᐵ](C)஺A)interfaceB)packageC)extendsD)class6.+byte[]x={11,22,33,-66);ᐸ104k43,ᑣxᦪxᐗ┯Ḅᵨ](C)஺A)x[5-3]B)x[k]C)x[k+5]D)x[0]7.Rᑡ=l@ᑡ᡻ngZchiḄo](B)஺charchl='A',ch2='W';if(chi+2

65A)/K'B),C)/C/D)B8.Rᑡ=l@ᑡ᡻ngZiḄo](D)஺inti=8,j=16;if(i-1>j)i―;elsej—;A)15B)16C)7D)89.Rᑡ=l@ᑡ᡻ngZkḄo](C)஺inti=l0,j=18,k=30;switch(j-i){case8:k++;case9:k+=2;case10:k+=3;default:k/=j;)A)31B)32C)2D)3310.R☢=l᡻ngZiḄo](B)஺for(inti=0,j=l;j<5;j+=3)i=i+j;A)4B)5C)6D)711.Aᨵfloatx=3.5f,y=4.6f,z=5.7f;ᑣyRḄ⊤£¤1,ostrueḄ](B)஺A)x>y||x>zB)x!=yC)z>(y+x)D)x3);A)16B)8C)4D)213.yRᵫfor=l᪀ᡂḄ¨©᡻nḄªᦪ](B)஺for(inti=0;true;i++);A)ᨵ=«┯Z᡻nB)¬▲ª0᡻n1ªD)Kª®᡻n

6614.}ᜮ°ᵨḄ±⛲³](C)஺A)privateB)staticC)abstractD)protected15.Ainttuvaஹb,floattuvxஹy,chartuvchᙳ+^_µzoZ^_Ḅswitch=l]D)oA)switch(x+y)B)switch(ch+1){.....}{.....)C)switchchD)switch(a+b);{.....}{.....}16.Rᑡᨬ·¸ឋiḄ1Z^_Ḅ]()஺A)staticfinalinti=100;B)finalinti=l.2;C)finali='w,;D)finalchari;17.Rᑡ}1Z^_Ḅ](C)஺A)classx{・・・・)B)classxextendsy{....}C)staticclassximplementsyl,y2{....}D)publicclassxextendsApplet{....}18.Ax、ys+Ḅ}wZRᑡx}ḄºxlḄ=l1^_Ḅ]()஺A)staticxxl;B)publicxxl=newx(int123);C)yxl;D)xxl=x();19.Aiஹjஹks}x1ḄinttuvwZRᑡ}xḄ᪀⌼¼ᦪ1^_Ḅ](B)஺A)x(intm){...}B}voidx(intm){...}C)x(intm,intn){...}D)x(inth,intm,intn){...}20.Rᑡ½«1Z^_Ḅ](A)஺A)intx(){charch=,az;return(int)ch;}B)voidx(){...returntrue;}C)intx(){...returntrue;}D)intx(inta,b){returna+b;}

6721.ᵨ}ᡂᕒḄ¿ÀÁᑴᩗḄKxᐵ]ÄDÅ஺A)class,float,double,publicB)float,boolean,int,longC)char,extends,float,doubleD)public,private,protected22.᪀ᡂ¨©Ḅ=l](C)஺A)for=lB)while=lC)switch=lD)do__while=l23.Rᑡ?@Æ᡻ngb3ḄÇÈ](D)஺booleanbl=true,b2,b3;24=bl?bl:b2;A)0B)1C)trueD)false25R☢ᦪ*Ç᪀1Z¸ÉឋḄ](B)஺A)ឋ⊤B)᪛C)ËᑡD)ᚮ᪘11.Aᨵinti=123;longj=456;R☢zo^_Ḅ=l](D)஺A)j=i;B)j=(long)i;C)i=(int)j;D)i=j;ÎஹÏÐ⚪OÄPÐ1ᑖÅ1.᪀⌼¼ᦪ-ÑߟᨵÓÔo஺2.Java=>1ḄÕÖtᦪ*᪷*ᦪ*ØÙÚÛÜᦪoÝÛḄÞZßKàᑖsfloatÜ—double----------áâᐹä}t஺3.åæ}ºḄçè³]Knew஺4.é᦮tuvnḄoë13◀íZᐸosfalseḄJava=>⊤£¤]__n%l3==0----------------஺5.ᙠJava=>1ZᡠᨵḄᦪxïᨵKXlenght¸ឋZðX¸ឋØÙñòᦪxḄߟᐗXᦪ஺6.}ó]KâôºḄ---᱄}------Zõ]ᡠᨵᐹᨵKᐳឋḄºḄôº÷ø஺7.ᙠJava=>1Z°ᵨKùú¬ᐵKKஹKKjavaûüýKKþᢈᵨ஺8.⊤3/6*5Ḅ0஺

689.☢Ḅpublicclass_intMyclass__________(intx,y;Myclass(inti,——=0----)//᪀⌼ᦪ(x=i;y=j;))10.☢JavaApplicationḄ"Ḅᐸ$%&'ᡠᨵ*+,-ᦪ஺importjava.io.*;publicclassMyClass(publicstaticvoidmain(Stringargs[])(if(args.length!=_0__)for(inti=0;i

69Aa;Bb;public____myprogram___init(){a=newA();b=__new__B();})12.JavaḄ>ᔠᦪ@AᨵஹᦪBCDEF஺JavaḄGᓫᦪ@AᨵᦪIA(᦮KCLMA)NOACPQA13.⊤3/6*5Ḅ0_____஺14.RIS10Ḅ10TUḄV᦮AWXIvarḄYZ-----longlvar=l*el0__________________஺15.\3᪀ஹᑖ^᪀(ᡈ`⌱b᪀)ஹcd᪀--------᪀ᓄ23fḄghijk2lᑴ᪀஺16.nUomḄ$%p;-ᦪqrḄ᦮ᦪsᑖ஺intm(floatx,floaty){______k=(int)x*y___________;}17-.Java823ᦻuvwxyḄᦻ`Sߟߟ{⁚ṹߟߟᦻᐸ᡽

70ShowArray(a);)publicstaticvoidSort(int[]x)intw;for(inti=l;ix[j+H){w=x[j];x[j]=x[j+1];x[j+l]=w;}/*if(i==l||i==2)ShowArray(x);if(i==2)break;*/))publicstaticvoidShowArray(intb[])(for(inti=0;i

712.ᑏ23Ḅ&'publicclassTest52(Stringstrl=HHello,Javaworld!\tStringstr2="Hello,students!";publicstaticvoidmain(Stringargs[])(System.out.print(strl);System.out.printIn(str2);))&'3.ᑏ23Ḅ&'publicclassT2-4(publicstaticvoidmain(String[]args)(inti,j;charc-*';for(i=0;i<5;i++)(for(j=0;j<=i;j++)System,out.print("*");System,out.printIn();}))&'4ஹᑏ23Ḅ&'publicclassex2_2

72publicstaticvoidmain(Stringargs[])intx,y;byteb=6;floatz=1.234f;doublew=1.23;booleanflag;x=12;y=300;flag=x>y;System,out.printIn(Hx>y==H+flag);flag=z>w;System,out.printIn(Hz>w==n+flag);))ÀஹÁ⚪(⚪5ᑖ)1.JavaḄDECC++ḄÅḄÆÇCÈÇᜐ஺ᵫËJavaÈ^ᢝÍÎÏÐᨵÑ%Òᡈ⌕ÔᵨᑖÕᙠÖᡈ×☢ḄUoᡈØឋᨵḄᓫÎÏÚᑴÛÈ%ÜÝ⌕p஺ÞÎÏÆßDEᨵàáḄᮣãឋäSDE4/ᨵåæçṹ஺èéDEnw6⌕DE×☢ᡠᨵḄUoCØឋêëDE×☢ḄØឋᙠìíî᝱☢publicstatic,ᡠᨵUoìíðñpublic.ÑnÍDE஺2.ᚗóôᦈḄöMC÷ᳮ஺êὃ⇋2hôᦈÚᑴ஺JavaY4û℉ḄᱯMÛþᐭᚗᦈᑴC++ᕒᨬᜮḄᑁᳮḄ⚪ᑓJavaᕒᙠ"ᑏḄ$᎛&'◤⌕ὃ⇋ᑁᳮ஺ᵫ.ᨵ0ᚗᦈᑴJava1Ḅ23&'ᨵ"5ᵨ7"Ḅᭆ9:ᨵ23Ḅ;ᵨ<ᨵ"5ᵨ7"஺ᚗᦈ=>ᨵᦔḄ■AᑁB☄ᨵᦔḄᵨ=>ᵨḄᑁ஺ᚗᦈᘤEFG5HI0ᓫKḄLMNḄOPQ&=⚜

73TḄUVW2ᑁᚮ1YZ[\Ḅᡈὅ_$`aᨵᵨḄ23bQcdeᦈᕒ&fg$Ḅhᵨᚗᦈᘤ2i023ᡈᡠᨵ23bQᚗᦈ஺ᦈᑴᨵᑖlmᑴᚗᦈe᪗oᚗᦈpqᚗᦈ஺3,rrfinal,finally,finalizeḄsN஺Final-t⛲v(ᐵyz)᝞}I0~Hfinal,ᕡḼ&f'Ḅ~&f5H᱄~஺I0~&fHabstractḄHfinalḄ஺qᡈHfinal,=>ᙠᵨ1&ᦋ஺HfinalḄqᙠ$ᙠ>Ḅ;ᵨ1:f¡&=tᦋ஺HfinalḄ¢£᪵:fᵨ&f¥¦஺Finally-'§Fᜐᳮ$©ªfinallyᙽᩭ᡻Q®¯c◀±5஺᝞}²I0§F³´µᓛ·Ḅcatch¸¹º᡻Qᯠ¼ᑴ¹ºbᐭfinallyᙽ(᝞}ᨵḄ¾)஺Finalize-¿஺JavaᢈÁᐕÃᵨfinalize()ᙠᚗᦈÄᘤ23Åᑁ1c◀ÆÇÈÉ⌕ḄcᳮÊ5஺Ë0GᵫᚗᦈÄᘤᙠÌË023aᨵ;ᵨ$2Ë023hᵨḄ஺GᙠObject~1ÍḄᡠᨵḄ~Î஺~⌚Ðfinalize()>᦮ᳮÒÓÔÕᡈὅ᡻Qᐸ×cᳮÊ5஺finalize()GᙠᚗᦈÄᘤᑤ◀23ÇÈ2Ë023hᵨḄ஺4,ᦪÚᨵaᨵlength()Ë0ÛStringᨵaᨵlength()Ë0ÛÜÝÞᵨÛᦪÚaᨵlength()Ë0ᨵlengthḄßឋ஺Stringᨵᨵlength()Ë0஺5.Java1Ḅ§FᜐᳮᑴḄáᓫâᳮeãᵨ஺äJAVAåæJAVAḄçÍèᑣ$JAVAê빺ìḄ┯î⊤ðHI0§F஺åæçÍèᑣᒹò2óUV஺IóGJAVA~ôᑁõḄçÍö÷஺Ý᝞ᦪÚW᪗øùº;ìIndexOutOfBoundsException;únullḄ23$º;ìNulIPointerException.ûIóUV¹GJAVAᐕÃᕒ᡽ýËóçÍö÷ᕒ=>þÿḄᵫ⌱ᙠᵨthrowᐵ஺ᡠᨵḄjava.lang.ThowableḄ஺ஹ("⚪11ᑖᐳ33ᑖ)

741ஹ((ᑏ*+,-./Ḅ0ᦪ2ᐭ4*+./5⁚ᦪ274ᢥ⁚,-Ḅ./஺9⌕;<=>?,@+᝞"ᡃABC"4,DE,4"ᡃAB",2ᐭ"ᡃABC=DEF",6,DE274"ᡃABC"F>"ᡃABC+=Ḅ@+"஺2ஹ(GHᡠᨵIJ᦮ᦪL?3᦮◀ḄᦪḄ5NO>L?3᦮◀ḄᦪḄᔜJᦪQ5஺3ஹ*+GHeḄR஺STUᑮl.Oe-6,4ஹW*+XN+ᦪYZ᣸Ḅ*ஹ⌱⚪\"⍝⚪^ᨵ*+_`aᫀ"c⚪2ᑖᐳ30ᑖd15⍝⚪1ஹᐵeJavafghi┯kḄ\CA.JavafgᐹᨵmnoឋB.Java*q☢ᔣXtḄfgC.JavafguḄvNwxyD.JavaḄᚗ{ᦈ}~ᑴᦈ>ᵨḄXt2ஹNhi_`Ḅ\BḄ`oaA.᪀⌼pub1icB.mainpublicC.JavaDᵨḄᦻvNḄD.᪀⌼DE4void3ஹᐵeJavauᦪhi_`Ḅ\BAஹ᦮ᦪᙠ>noT>B.booleanᦪ^ᨵ2+Rtrue5falseC.ᦪeᓫᦪD.JavauḄᢣ┐5CfgḄ*᪵4ஹintx=l,floaty=2,ᑣ⊤Ux/yḄR\DA.0B.1C.2D.N¡>5ஹNf¢ᨵf┯Ḅ\A

75A.intx=l;y=2;z=3B.for\intx=10,y=0;x>0;x++d;C.while\x>5d;D.for\;;d;6ஹᐵe5XtḄhi_`Ḅ\AdA.JavaḄᑖ4IᜧÄᑖÅÆÇÈḄ5ᵨᡝÇÈḄB.Ḅ☟᝱ឋ5ᐰÍÎÏḄᭆÑÒᐰ*᪵^⊤UÓ>C.ḄᡂᕒÖ×ᨵ*+ឋ5*+D.XtḄØÙᓄ7ஹNᨵᐵ᪀⌼ḄÜ_`Ḅ\AdA.*+Ḅ᪀⌼vNᨵw+B.᪀⌼ᙠÇÈ?ÝᵨC.᪀⌼^LᵫXtuḄᐸßÝᵨD.᪀⌼vN5àvN5>8ஹNᨵᐵḄxyḄhiu_`Ḅ\DdA.Lâãxy᱄ᡠᨵḄåæᨵឋàvçèãéxy᱄ḄæᨵឋB.^Lxy᱄Ḅ>Lxy᱄ḄឋC.^Lxy᱄Ḅåæᨵឋ>Lxy᱄ḄD.>Lxy᱄Ḅæᨵឋ9ஹᑡeìᘤḄᨵ\BdA.JButtonB.JPaneC.CanvasD.JTextArea10ஹvoidḄóÈ\CdA.ô4õB.ÇÈḄöᨵÓ÷C.ÇÈḄöᨵøR

76D.ḄøR>L÷ùúûüú11ýᐵeJavauḄhi_`Ḅ\DdA.(ᑏèuþṹḄ┯B.ᑏṹḄ┯C.ḄD.ᣓ!"ᜐᳮḄ12ஹᡠᨵḄ*Ḇ,-./0*13C4A.java.io.ExceptionB.java.lang.ThrowableC.java.lang.ExceptionD.java.lang.Error13ஹJ☢.0LjavaMḄᐵOP13B4A.longB.sizeofC.instanceofD.const14ஹUVWXYḄZ[\◤⌕_ᵨJᑡbcdeᔠ〉13D4A.DatastreamB.FilestreamC.BufferedstreamD.Pipedstream15ஹᙠo⌱᪾rst᪗\ᯠᓫx/⌱⚗\⌕ᣓ!ᡠ⌱⚗z◤V.0{|13D4A.ActionListenerB.MouseListenerC.MouseMotionListernD.ItemListenerஹ⚪31ᑖ\ᐳ20ᑖ41ஹ☢ᔣᡠᐹᨵḄᱯߟߟឋ/ߟ\/ឋ,/,-

77ឋ/\-᝱ឋ/2ஹᦪx᝞Jintx[][]=newint[3][2]ᑣx..lengthḄ¢U---3--------,x[0].lengthḄ¢U-----2-------஺3ஹJavaV¤/¥_ᵨ¦c§\//ߟ,-Thread*_________,_____VRunnable§__________4ஹJavaḄ©ªᵨᡝ¬☢\ᨵ®¯°ᳮᘤᵨᩭ᤮´µḄ¶·\/¥ᵨᑮḄ®¯°ᳮᘤᨵ(ᑡºcᓽ)/FlowLayout_____,.__GridLayout_____,--BorderLayout-----,___CardLayout_______5ஹAppletᵨḄ§__init0/run()/ஹ__stop()/"destroy()஺½ஹ▅¿\ᑏḄÀÁÂ(⚪5ᑖ\ᐳ20ᑖ)1ஹclassA{privateintprivateVar;A(int_privateVar){privateVar=_privateVar;)booleanisEqualTo(AanotherA){if(this,privateVar==anotherA.privateVar)returntrue;elsereturnfalse;))publicclassB{publicstaticvoidmain(Stringargs[]){Aa=newA(1);Ab=newA(2);System,out.printIn(a.isEqualTo(b));

78)ḄÀÁÂU——false_____2ஹclassA{doublef(doublex,doubley){returnx*y;))classBextendsA{doublef(doublex,doubley){returnx+y;))publicclassTest{publicstaticvoidmain(Stringargs[]){Bobj=newB();System,out.printIn(nTheprogramoutputis"+obj.f(4,6));))ḄÀÁÂU/Theprogramoutputis10.3ஹpublicclassUnchecked{publicstaticvoidmain(String[]args){try(method();}catch(Exceptione){System,out.printIn("A");}finally{System,out.printIn("B");

79)staticvoidmethod(){try(wrench();System.out.println(HCn);}catch(ArithmeticExceptione){System,out.printIn(HDH);}finally{System,out.printIn("E");)System,out.println(nFn);)staticvoidwrench(){thrownewNul1PointerException();))ḄÀÁÂUEAB4ஹpublicclassTest{publicstaticvoidmain(String[]args){intx;inta[]={0,0,0,0,0,0};calculate(a,a[5]);System,out.printIn(Hthevalueofa[0]is"+a[0]);System.out.printIn("thevalueisa[5]is"+a[5]);}

80staticintcalculate(intx[],inty){for(inti=1;i

81Strings="Gonewiththewind";Stringt="goodStringk=s+t;B.Strings="Gonewiththewind*1;Stringt;t=s[3]+"one";C.Strings="Gonewiththewind";Stringstandard=s.toUpperCase();D.Strings="homedirectory";Stringt=s-"directory11;5.ᙠ//pointxᜐḄ.ÃØÙᔠḄ[DE]classPerson{privateinta;publicintchange(intm){returnm;})publicclassTeacherextendsPerson{publicintb;publicstaticvoidmain(Stringarg[]){Personp=newPerson();Teachert=newTeacher();inti;//pointx))A.i=m;

82B.i=b;C.i=p.a;D.i=p.change(30);E.i=t.b;6.ÚFrameḄᜧÜÝᦋÐß\FrameḄᢥáḄ¶·âÔÝᦋÐ\ãäåß_ᵨḄæ箯°ᳮᘤ[B]A.BorderLayoutB.FlowLayoutC.CardLayoutD.GridLayout7.ÏJ☢ḄṹᱏÓ1publicvoidcreate(){2VectormyVect;3myVect=newVector();4)J☢Ḅ.Ã▰éêëḄ1[ADE]A.ìḄØÙLíUÐÑmyVectᑖîᑁðY஺஻ᢣḄᚮY\ôᙠ᪘ᑖî;÷øLᵨùú.ûüᳮýþÿB.ḄᑖᑮVectorḄᵨḄᑁ஺C.Vector஺D.Vector஺E.Vectorᑖᑁ஺஻ᑖ᪘!ᢣ┐$%&ᑖ"ᑮVectorḄᵨḄ"⌱⚗Ḅ*+%ᑖ,ᚮ8..☢Ḅ012ᫀ45ᵨ5⊤789ᑴ;8?[A]A.010B.0x10C.08D.0x8

839.01&%Javaᐵ=>[AB]A.TRUEB.sizeofC.constD.superE.void10..☢Ḅ01?@A஺[AD]A.equals஺BCᑨEᵨ;%ᔲᢣᔣH஺//&J%KḄL%MNḄB.==PQRᑨESᑖTḄḄᑁUVW%ᔲX஺C.equals()BCYᨵᙠSḄᑁUX\]^true஺D.File_ᑏBCequals஺ᙠSᑖTḄḄᑁUVWX\]^true஺஻SaTḄḄᑁUVWX11..☢ᐵ!bcḄ01?@%deḄ஺[AD]A.ᙠjavafYᐕhᓫbc஺B.ᙠjavafYjklmn஺C.ᙠjavaf&jH\bcVklmn஺D.javaḄᓫbcopṹr4☠஺12.ᓝḄuvᵨ01BC.[D]1classPerson{2publicvoidprintValue(inti,intj){}3publicvoidprintValue(inti){}4)5publicclassTeacherextendsPerson{6publicvoidprintValue(){}7publicvoidprintValue(inti){}8publicstaticvoidmain(Stringargs[]){9Persont=newTeacher();10t.printValue(10);11

8412}A.2ḄBCB.3ḄBCC.6ḄBCD.7ḄBC13..☢01&%javaḄyzᦪ|W[BC]A.shortB.BooleanC.unitD.float14..☢Ḅ01ᐵ=>}~ᵨᩭḄ┝᪗oḄ%᣸Ḅ[B]A.transientB.synchronizedC.serializeD.static15.main஺BCḄ]^W%[B]A.intB.voidC.booleanD.static16.5.ᐵ!oᵨ〉Ḅ>RḄ>ḄTextFieldḄ⊤TextFieldt=newTextField("theyaregood",40);//40ᢣḄ%01?@%Ḅ[D]A.7Ḅ>R45oᵨ>஺B.fᨬᜧḄ>Rᦪ%40C.7Ḅd%40>R஺D.ᵨᡝ45¡¢>R஺

8517.ᐵ!ᚗ¤ᦈ¦Ḅ01?@%Ḅ[B]A.§¨©ªὅ¬®¯°§9ᑁ±²Ḅ³Q஺B.ᚗ¤ᦈ¦u´µ¶±²&·oᵨḄᑁ஺C.ᚗ¤ᦈ¦ᐕh§¨©ªὅeᢣE¶Tᓽ±²ᑁ஺D.ᚗ¤ᦈ¦j¹ᙠº»Ḅ\±²javaoᵨḄᑁ஺18..☢Ḅpṹ1publicclassTest{2intm,n;3publicTest()04publicTest(inta){m=a;}5publicstaticvoidmain(Stringarg[]){6Testtl,t2;7intj,k;8j=0;k=0;9tl=newTest();10t2=newTest(j,k);11)12)ᙠ¡¼\0u½X┯¿[D]A.3B.5C.6D.1019.ThreadḄBCresume஺ÀÁឮÃ01°§Ḅ᡻[D]A.}Åvᵨstop஺BCÆÇÈḄ°§஺B.}Åvᵨsleep஺BCÆÇÈÉḄ°§஺C.}Åvᵨwait஺BCÆÇÈÉḄ°§.D.}Åvᵨsuspend஺BCÆÇÈÉḄ°§஺஻ÊËź,

8620.ᨵᐵ°§Ḅ01?@%Ḅ[BD]A.Ì°§ÍLTᓽ©zÉ஺B.oᵨstart஺BC45o°§ᡂ4ÉḄ$%Í&ETᓽ©zÉ஺C.°§ÏÐᐜÒᑴÆÇÈÉͲᙠ4ÉÓᑡḄÕ☢஺஻ÖÍ×ᐜØÙḄ9§Ðᓰ,cpu,ÍÉḄ\᪷|PQÜÝÆED.°§4jÏ&HḄyÏÇȶ9ᐭLßà᝱஺//4Éà᝱21..☢Ḅ&â᦮ḄBC12{success=connect();3if(success==-l){4thrownewTimedOutException();5)6}ÊäTimedOutException&%RuntimeException஺.☢Ḅ0145ᐭâᡂåBCḄ[BC]A.publicvoidmethod()B.publicvoidmethod()throwsExceptionC.publicvoidmethod()throwsTimedOutExceptionD.publicvoidmethod()throwTimedOutExceptionE.publicthrowTimedOutExceptionvoidmethod()22..☢ḄpṹclassPerson{Stringname,department;publicvoidprintValue(){System,out.printIn("nameis"+name);System,out.printIn("departmentis"+department);

87)publicclassTeacherextendsPerson{intsalary;publicvoidprintValue(){//âᡂ᱄pṹfprintValueOHḄ³QSystem.out.printIn("salaryisH+salary);)).☢Ḅ01⊤45ᐭprintValueOBCḄç±èᑖ[D]A.printValue();B.this,printValue();C.person.printValue();D.super.printValue();23..☢Ḅ01é;%┯Ḅ[A]A.floatf=11.1;B.doubled=5.3E12;C.doubled=3.14159;D.doubled=3.14D;24..☢Ḅ&â᦮ḄpṹclassPerson{Stringname,department;intage;publicPerson(Stringn){name=n;}publicPerson(Stringn,inta){name=n;age=a;}publicPerson(Stringn,Stringd,inta){//âᡂPerson(Stringn,inta)Ḅê¢department=d;)

88.☢Ḅ01⊤45ᑮ᪀⌼BCfḄç±ᜐ[C]A.Person(n,a);B.this(Person(n,a));//᪀⌼îᦪḄï>&jBCïvᵨC.this(n,a);D.this(name,age);஻᪀⌼BCḄðᦪñ&jòmókôõöï25..☢ᐵ!õö÷ᐸúḄ▰@01%Ḅ[ACD]A.kôõö%Ḅᡂᕒõö஺B.kôõöᵨᐵ=>static஺C.ᙠBCfEýḄþèõöᙠBC᡻\D.þèõöᙠoᵨÕ¬ÿᓄ஺26.☢Ḅṹpublicvoidtest0{try(oneMethod();System,out.printin("condition1");}catch(ArraylndexOutOfBoundsExceptione){System,out.printin("condition2");}catch(Exceptione){System.out.printin("condition3");}finally{System,out.printlnC'finally");))ᙠoneMethod()Ḅ[AD]A.condition1B.condition2C.condition3D.finally27.☢Ḅṹ

89publicclassTest{voidprintValue(intm){do{System,out.printIn("Thevalueis"+m);}whi1e(--m>10);)publicstaticvoidmain(Stringarg[]){inti=10;Testt=newTest();t.printValue(i);))[C]A.8B.9C.10D.1128.☢ḄᨵᐵḄ!"#$Ḅ[BC]A.$%ᦪ'()*᝞boolean,byteḄ,-Ḅ./01,-ᑖ3ᑁ567஺B.$%ᦪ'()*᝞boolean,byteḄ,-Ḅ08ᑖ3ᑁ567஺C.9%ᦪ'()*᝞String,VectorḄ,-Ḅ./01$:ᑖ3ᑁ5஺D.9%ᦪ'()*᝞String,VectorḄ,-Ḅ/01$:ᑖ3ᑁ5஺஻1$:ᢣḄᚮ67Ḅ$:;ᢣᔣ1$:Ḅ@ᵨBCD,-E29.(ḄFG⌕IJḄKLᡂᕒ,-.CO᜜Q(RSTU஺V1Wᵨ☢Ḅ!X⛲Z[\◤⌕ḄTU^ᑴ[D]A.publicB..`X⛲ZC.protected

90D.private஻☢ᔣ$:jkP196⚓Ḅ⊤r,privatetᨵ┯v30.☢Ḅṹᱏz1Stringstr=null;2if((str!=nul1)&&(str.length()>10)){3System.out.printin("morethan10")E4)5elseif((str!=null)&(str.length()<5)){஻6ᢣ┐6System,out.printin("lessthan5");7)8else{System,out.printlnC'end")E}!┯v[C]A.1B.2C.5D.831.☢ᨵᐵjavaṹ¡ᐰឋḄ"#!$Ḅ[BCD]A.¤⁚ṹ᪥§ᘤ`©ª«᡻◤⌕Ḅᡠᨵ(஺B.®¯°ᘤ᡻ṹ஺C.ᙠ®±¤⁚ṹO`©±§²ᯠ´ᙠ¯°ᘤµ☢஺D.(`©ᘤ¶·ᑖ¸¹ºᦻ¼½¾Ḅ(¿ÀÁÂᐭḄ(Ä`¡ᐰឋ஺32.☢ḄṹpublicclassPerson{intarr[]=newint[10];஻9☟᝱Êឋpublicstaticvoidmain(Stringa[]){System.out.printIn(arrপ)E஻☟᝱.CTU9☟᝱Êឋ)

91!"#$ḄÍ]A.jή┯஺B.jήÏЮ┯஺C.0஺D.null.33.☢ḄṹpublicclassParent{publicintaddValue(inta,intb){ints;s=a+b;returns;})classChildextendsParent{)!ÑÒ`ᐭ(ChildÓ[BC]஻Ḅ⌚ÕA.intaddValue(inta,intb){//dosomething...}B.publicvoidaddValue(){//dosomething...)C.publicintaddValue(inta){//dosomething...}D.publicintaddValue(inta,intb)throwsException{//dosomething...}34.Öᨵᡂᕒ,-MAX_LENGTHtLint)×±,-Ḅ×Øᢝᦪ×100,ÚÛÜL,-Ḅṹ0[CD]A.publicintMAX_LENGTH=100;B.finalintMAX_LENGTH=100;C.finalpublicintMAX_LENGTH=100;//X⛲ZḄÞßÑÒàᣚD.publicfinalintMAX_LENGTH=100;35.☢Ḅ!javaâᦻ¼ṹᱏz$Ḅ[ACD]A.packagetestpackage;publicclassTest{//dosomething...}

92B.importjava.io.*;packagetestpackage;publicclassTest{//dosomething...}C.importjava.io.*;classPerson{//dosomething...)publicclassTest{//dosomething...}D.importjava.io.*;importjava.awt.*;publicclassTest{//dosomething..}36.☢Ḅ(publicclassSample{longlength;publicSample(long1){length=1;}publicstaticvoidmain(Stringarg[]){Samplesi,s2,s3;si=newSample(21L);s2=newSample(21L);s3=s2;longm=21L;))L⊤ãäåætrue?[B]A.si==s2;B.s2==s3;C.m==si;D.si.equals(m);37.☢ᨵᐵjava.awt.ListḄ⊤ãäList1=newList(6,true);஻çLèᦪfalseḄéBC⌱tLᐸÓ!"#ÏḄ[AC]

93A.ᙠìᨵᐸJḄíîḄᩩ¼1ᑡ⊤ᨵ6Ññ஺B.tḄᨬᜧ¤Zᦪ6C.ᑡ⊤ᐕõᵨᡝ÷⌱D.ᑡ⊤BCᨵt⚗O⌱Ó38.☢ḄṹclassParent{Stringone,two;publicParent(Stringa,Stringb){one=a;two=b;)publicvoidprint(){System,out.printIn(one);})publicclassChildextendsParent{publicChild(Stringa,Stringb){super(a,b);)publicvoidprint(){System.out.printIn(one+"to"+two);)publicstaticvoidmain(Stringargs[]){Parentp=newParent("south","north");Parentt=newChiId("east","west");p.print();t.print();))☢Ḅ!ᡈḄúûÏ[E]

94A.jή┯B.southeastC.southtonortheasttowestD.southtonortheastE.southeasttowest39.(Teacher¿Studentü(PersonḄý(Personp;Teachert;Students;þp,t¿sü96×if(tinstanceofPerson){s=(Student)t;}ÜLÿḄ[C]//newḄ;A.᪀⌼StudentB.⊤ᔠC.!"D.!ᔠ#ᙠ%&'("40.)*+☢Ḅ-ṹStrings="hello";Stringt="hello";charc[]={/h///e//T/,T///o/);+ᑡ⌱⚗3/4567true?[ACD]A.s.equals(t);B.t.equals(c);C.s==t;

95D.t.equals(newString(nhelIo11));E.t==c;ஹᓫ⌱⚪(ᜧ⚪15=⚪/>=⚪2ᑖ/ᐳ30ᑖ)L+ᑡB᡻&D/EFaஹcḄGᑖH()஺intx=182;inta,c;c=x/100;a=x%10;A)1,2B)2,1C)1.82,2D)100,82ூKᫀ௃B2.+☢4⊤'ᵨOᑮxQyḄᨬᜧG()?A)x>y?y:xB)xy?(x+y):(x-y)D)x==y?y:x;ூKᫀ௃B3.S+TᵨUVWXYḄ☟᝱\printBinary,]ᙠᐸmain\Wᨵ\`ᵨBprintBinary(2),ᑣb*Ḅ()«staticvoidprintBinary(inti){System.out.print(i+"Ḅ2eᑴᦪ⊤hij\t");for(intj=31;j>=0;j--)if(((1«j)&i)!=0)System,out.print("1");elseSystem,out.print("0");System,out.printIn();஻ᣚ&}A)09000000000000000000000000000001B)00000000000000000000000000000010

96C)0000000000000000000000000000111100000000000000000000000000000000【答案】B4.TᵨUVḄmain\WᨵS+B/ᑣb*Ḅ()஺Stringsl="0.5",s2="12";doublex=Double.parseDouble(si);inty=Integer.parselnt(s2);System,out.printin(x+y);A)12.5B)120.5C)12D)«12・5”【答案】A5.TᵨUVḄmain\WᨵS+B/ᑣb*Ḅ()஺doublex=1234.1234567;DecimalFormatforml=newDecimalFormat("0000.0");System,out.printin("PT="+forml.format(x));A)PI=1234.1B)PI=1234C)PI=1234.1235D)PI=1234.0【答案】A6.+ᑡUVm᡻&DḄ()஺Strings=newString("abcdefg");for(inti=0;imax)max=x[i];

97)System,out.printIn(max);A)678B)122C)-987D)33ூKᫀ௃A8.+ᑡBVᑡ᡻&D/kḄG(intx=2,y=5,k=0;switch(x%y){case0:k=x+y;break;case1:k=x-y;break;case2:k=x*y;break;default:k=x/y;break;)System,out.printIn(k);A)2B)5C)10D)0ூKᫀ௃C9.+☢ḄUVb*Ḅ()publicclassAimplementsB{publicstaticvoidmain(Stringargs[]){inti;Acl=newA();i=cl.k;System,out.println("i="+i);})interfaceB{intk=10;)A)i=0B)i=100UVᨵ!┯qD)i=true

98ூKᫀ௃B10.TᵨUVḄmain\WᨵS+B/ᑣb*Ḅ()஺intb[][]={{1,2,3},{4,5},{6,7}};intsum=0;for(inti=0;i

99A)45B)5C)123D)12345ூKᫀ௃C13.+☢ḄUVm᡻&Db*Ḅ()஺StringBufferbuf=newStringBuffer("Beijing2008n);buf.insert(7,;System,out.printIn(buf.toString());A)Beijingci)2008B)QBeijing2008C)Beijing2008aD)Beijing#2008ூKᫀ௃A14.+☢ḄUV!%&Db*Ḅ()஺publicclassAimplementsRunnable{publicstaticvoidmain(Stringargv[]){Aa=newA();Threadt=newThread(a);t.start();)publicvoidrun(){while(true){try(Thread.currentThread0.sleep(1000);}catch(InterruptedExceptione){System,out.printIn(e.toString());)System,out.println("loopingwhile");)))A)ᙠb*"loopingwhile"0B)ᙠb*y"loopingwhile"஺

1000ᨵb*஺D)S┯q஺ூKᫀ௃A15.+☢ḄUVmBufferedReaderḄin,Sdmyᦻᜳ+Ḅᦻl.txt.File᪀⌼ᦪWḄQᦻḄ⊤h()஺Filef=newFile(-ṹᜐ);file=newFileReader(f);in=newBufferedReader(file);A)"1.txt"B)"d:\\my\\l"C)"d:\\my\\l.txt"D)"d:\my\l.txt"ூKᫀ௃Cஹ⌱⚪(ᜧ⚪10=⚪/>=⚪2ᑖ/ᐳ20ᑖ)1.+☢ḄḄ()஺A)JavaB☢ᔣḄஹ᡻&Ḅ¡UB஺B)JavaBᐹᨵ'£¤ឋ/¦§¨©ᐵḄUB0JavaB'ᑁ¬ᚗ®¯°ᦈ²஺D)JavaBᑏḄUV´ᯠ“y!/ᑮᜐ%&”/¸¹º⌕javaḄ%&¼᛻஺ூKᫀ௃ABCD2.+☢main஺\ḄXY45Ḅ()?A)publicstaticvoidmain(Stringargs[]){}B)publicstaticvoidmain(String[]){}C)publicstaticvoidmain(String[]args){}D)publicstaticvoidmain(String[]x)0

101ூKᫀ௃ACD3.XYEF᝞+jcharc='w';inti=8;longL=15;floatf=8.9f;S+×GBḄ()஺A)i=c+i;B)c=c+i;C)L=f+L;D)f=i+L+f;ூKᫀ௃AD4.+☢45ᐵÛÜ(ᵨᩭÞᑴᡂᕒḄáâãä?AäpublicBäprotectedCäprivateDädefaultூKᫀ௃ABC5.☢ᔣUVëìḄíᱯïãä஺AäðBäñòCäóôDä᝱ூKᫀ௃ABCD6.+☢ᐵöḄḄãä஺AäJavaBWḄøᔠᦪùs஺BäWᒹûᦪùEFQ\஺CäᡠᨵᐹᨵXᐳឋḄḄð஺DäJavaBḄýþᢝᓫ஺ூᫀ௃ABCD7.☢Ḅ.publicclassT1{publicstaticvoidmainString[]args{T1a=newT1;a.method8;a.method1.2f;voidmethod(floati){System,out.printIn("float:"+i);

102}voidmethod(longi){System,out.printIn("long:"+i);))A)ᨵ┯GHIJmethod஺KLMNOP☟᝱(static)Ḅ஺B)STUVWlong:8float:1.2C)STUVWfloat:1.2long:8D)XOPḄIJYᦪ[\ḄmethodKL]KL^_஺ூᫀ௃BD8.☢`ᙠbcJavadᵨA,f᪵hiᙠmain(Stringargsj)KLXklᓫm"first"()?javaAthefirstsnow,thefirstsnowcame.A)args[0]B)args[1]C)args[2]D)args[5]ூᫀ௃BD9.☢Ḅ().publicclassA{publicstaticvoidmain(String[]args){Aa=newB();a.test();voidtest0{System.out.print("A");

103classBextendsA{voidtest0{super,test0;System,out.printlnC'B";AnoBOPpq᱄oAX\sḄKLtest,javaX]KLḄ⌚u஺BvṹSTUVWABCvṹSTUVWA஺DnoBOPpq᱄oAX\sḄKLtest,javaX]KLḄ^xூᫀ௃AB10.☢yJzL{|?A᝞ᐳḄjᙠJᦻXᑣjMNqᦻᐹᨵ\Ḅs஺B᝞ᦻᒹimportᑣMN`◀᜜ḄJ஺C᝞ᦻᒹpackageᑣMN`Jஹ஺DjXḄKLMO`KLST[ᵨᐵabstract¡⛲஺ூᫀ௃ABCD£ஹ¤⚪¦ᜧ⚪10¨⚪©¨⚪1ᑖᐳ10ᑖ1.«¬oḄ®¯ᵨ°±----------³ᑖ´ᑁ¶·஺

1042.OPoḄ᪀⌼KL[iᨵº»¼o½ᐸs]q——s\஺3.JavaÀXᐵ--⊤ÂÃÄÅo½஺4.ÆᨵOPWfloatb={l.If,3.5f,6.8f);,ᑣb.length()Ḅ¼`_____5.ÆᨵoOPWclassBextendsA{ᑣoB`oAḄ-----஺6.jXḄᡂᕒÊᨵ☟᝱ËÌ----07.ᙠnoX¯ᵨᐵ-----ÍÎÏSÐᵨno⌚uḄ᱄oXḄKL஺8.ᐵ----ᵨÑÒᐭᒹXḄoᑮXÕX¯ᵨ஺9.JavaÀXÖË×SiØÙÚËḄKLÐᵨÛᑮtryᙽXᵨÝÞᐸßḄ——ᙽᩭᣓâᜐᳮÚË஺10.XåæçèḄKLᨵIéW——oåæRunnablej஺ூᫀ௃1.new2.o3.double4.35.no6.KL7.super8.import9.catch10.Threadêஹ▅ì»l⚪(¦ᜧ⚪5¨⚪©¨⚪5ᑖᐳ25ᑖ)1.(5ᑖ)1:publicclassOutput1(2:publicstaticvoidmain(Stringarge[]){3:inti=0;4:for(charch=97;ch<113;ch++,i++){5:if(i%8==0)6System,out.printlnC")í

1057System,out.print"\t"+ch;8:}9:}10:}প5ஹ6ḄifḄõi`ö÷ø2ᑖ2UVḄᨵùø3ᑖூᫀ௃1©ᡭᓺ8J±ᑣᣚ஺2UVḄᨵ2஺2.5ᑖ1:importjava.util.Arrays;2:3:publicclassSortArray{4:publicstaticvoidmainStringargs[]{5:String[]str={"size","abs","length","class"};6:Arrays,sortstr;7:forinti=0;iᵨstr[0].length஺Ḅ@A67BCD?3ᑖூHᫀ௃পabsclasslengthsize243.5ᑖ1://TestKeyListener.java2importjava.applet.Applet;3importjava.awt.*;4importjava.awt.event.*;56publicclassTestKeyListenerextendsApplet{7

1068:Colorclr;9:10:publicvoidinit(){11:12:addKeyListener(13:newKeyAdapter(){14:publicvoidkeyTyped(KeyEvente){15:if(e.getKeyChar()=='rzIIe.getKeyChar()=='R,)16:clr=Color.red;17:elseif(e.getKeyChar()=='g'IIe.getKeyChar0==,G,)18:clr=Color.green;19:elseif(e.getKeyChar()=='b,||e.getKeyChar()=='B')20:clr=Color.blue;21:else22:clr=Color.black;23:setBackground(clr);24:)25:});26:27:}প01T15ஹ163VWḄXYBZ[\(2ᑖফ]^_01`a]ᑏbᐭ_01d⁚ṹᦻhḄi⚓4`klmᢝjavaḄopᘤᡭsi⚓஺᝞7᦬vwxḄEw`ᨵZ[67\(3ᑖ

107ூHᫀ௃D᝞7᦬vwxḄ{w`ᑣ}~⁐Ḅ⁐஺201Ḅ~⁐ᐲ⁐஺4,AB᝞.(5ᑖ)classA(inta=l;doubled=2.0;voidshow()(System,out.printIn(HClassA:a=H+a+H\td=H+d);))classBextendsA(floata=3.Of;Stringd=nJavaprogram.voidshow()(super.show();System,out.printIn(HClassB:a="+a+"\td="+d);))(1)ᙠᵨ01Ḅmain<={ᨵAa=newA();a.show();ᑣ/Ḅ67᝞¡\(2ᑖ)(2)ᙠᵨ01Ḅmain<={BḄb:Ab=newB();

108b.show();ᑣ/Ḅ67᝞¡\(3ᑖ)ூHᫀ௃(1)ClassA:a=ld=2.0(2)ClassA:a=ld=2.0ClassB:a=3.0d=Javaprogram.5.(5ᑖ)importjava.util.*;publicclassW{staticString[]s={"ᵬ"J£"`"¤"`"¥"};publicstaticvoidmain(String[]args){Stackstk=newStack();for(inti=0;i

109Ḅ½☢᝞:AஹKஹQஹJஹ10ஹ9........3ஹ2ËÌ⁐᝞“Î᪻”ஹ“᪻”ஹ“᫥Ì”“<ᙽ”஺Card{Ḅpublic¿Àᩗ▲Ḅ᪀⌼<=`{ḄÅÕprotected¿Àᩗ▲Ḅ<=getFaceO,Öᑮᡫ¼½Ḅ½☢Õprotected¿Àᩗ▲Ḅ<=getSuit,Öᑮᡫ¼½ḄÌ⁐Õ<=toString,@A⊤Ùᡫ¼½ḄÌ⁐½☢dÃÄ᝞“᪻A”ஹ“᫥Ì10”Ë஺ூHᫀ௃L5ᑖclassCard{privateStringface;privateStringsuit;publicCard(Stringf,Strings){face=f;suit=s;)protectedStringgetSuit0{returnsuit;)protectedStringgetFace(){returnface;

110)publicStringtoString(){returnface+"of"+suit;))2.ᵨ01Ḅmain<={`dÃÄᦪÛfs:ᑖÆ⊤Ùᡫ¼½Ḅ½☢Ì⁐Õ52¹ᐗÝḄCardÞᦪÛdeck,ᵨᩭàá4¹Ì⁐Ḅ52ɽ஺᝞ᡠÙ஺Stringf[]={"A","2","3","4","5","6","7","8","9","10","J","Q","K");Strings[]=("Î᪻"`"᪻"`"᫥Ì"`"<ᙽ"}ÕCarddeck=newCard[52];(1)ãᵨCardḄ᪀⌼<=ädeckᦪÛḄ52ɽ`⌕³ᦪÛ{ᐜàáÎ᪻Ì⁐ḄAஹ2ஹ3........K;ᯠ4B᪻Ì⁐ḄAஹ2ஹ3........K;᫥ÌÌ⁐ḄAஹ2ஹ3...........K;<ᙽÌ⁐ḄAஹ2ஹ3K஺·ᑏ/VWæÈXYḄ01ç஺ூHᫀ௃(1)5ᑖfor(inti=0;i

111ூHᫀ௃(2)5ᑖfor(intfirst=0;first

112(12)ûx=1,y=2,z=3,ᑣ⊤þÿy+=z---/++xḄ(A)஺A.3B.3.5C.4D.5(13)ᙠJavaAppletᵨᡝḄApplet◤⌕᱄Ḅ(D)ᩭᡂ!"#஺A.start()B.stop()C.init()D.paint()(14)$ᐕ&#'(ᡂᕒḄ*+,ᑴ.Ḅ(B)0A.publicB.privateC.staticD.protected(15)'ABḄ/0123ᦪ056Ḅmethod7ᑏᜮ:;:ᵨ?@ABᵨCDᜮḄ12'()஺A.staticvoidmethod()B.publicvoidmethod()C.finalvoidmethod()D.abstractvoidmethod()(16)ᙠJavaᡠᨵḄ᪷()oA.java.lang.ObjectB.java.lang.ClassC.java,applet.AppletD.java.awt.Frame(17)ᙠJavaᵨPackageHIJK/ᒹMDᒹḄNOP᪀RS()oA.TᦻVḄP᪀WXB.TᦻVYZḄNOWXC.TᦻV[WXD.TᦻVᜧ]WX(18)ᙠ^_.ᦻVEmployee.datM:ᵨDᦻV#'3ᦪḄ()஺A.BufferReaderB.DatalnputStreamC.DataOutoutStreamD.FilelnputStream(19)`ᑡ᪀⌼ḄBᵨ2cdḄ()oA.ᢥ᯿BᵨB.ᵫᵨᡝhiBᵨC.jklmnewnBᵨD.opqBᵨ(20)PanelrsḄtuvᳮᘤ()஺A.GridLayoutB.BorderLayoutC.FlowLayoutD.CardLayout(21)ᙠJavakyz{|}ᦔḄ2()஺A.ᑁB.〉ᘤC.iD.X(22)char[Ḅ()஺A.2-7~27-1B.0^216-1C.-215~215-1D.0~28T(23)kᢝjavadocḄHI()0A./**...஻B./*...*/C.//D./**...*/(24)ᓝᑴᦪ16Ḅ16ᑴ⊤2()»A.0x10B.0x16C.OxAD.16(25)int[publicᡂᕒMAX_LENGTH,Dᢝ'ᦪ100,ᑣ/ḄHI()oA.publicintMAX_LENGTH=100B.finalintMAX_LENGTH=100C.publicconstintMAX_LENGTH=100D.publicfinalintMAX„LENGTH=100(27)`ᑡ@Aᵨᩭ/Ḅ()oA.yzjava.lang.Runnablei¡ᑏstart()B.yzjava.lang.Runnablei¡ᑏrun()C.yzjava.lang.Thread¡ᑏrun()D.yzjava.lang.Thread¡ᑏstart()

113(28)`ᑡᐵ¥JavaApplicationTAppletḄJcdḄ()஺A.³ᒹ´main஺B.³lm"appletviewer”᡻¼C.³lm“javac”ÀÁD.³ÃᐭᙠHTMLᦻV᡻¼(29)ÊËnAppletM✌ᐜBᵨḄ()஺A.stop()B.init()C.start()D.destroy0(30)`ᑡᐵ¥ÒᐜÓḄJcdḄ()oA.ḄÒᐜÓ$kᦋḄB.ḄÒᐜÓᙠMÕÖḄC.ᙠ×ḄØÙM᎛³@AÕÖD.BÛC(31)ÊÝÞᘤ56Appletᡠᙠ⚓☢MáBᵨAppletḄ()oA.start()B.init()C.stop()D.destroy()(32)ᢥ᯿JavaḄ᪗ã.<ä`ᑡ⊤/Ḅ᪗ã.cdḄ()oA.HelloworldB.HeiloWorldC.helloworldD.helloWorld(33)`ᑡçṹáéê/ÀÁ┯ìḄ¼()஺1)publicclassTest{2)intm,n;3)publicTest(){}4)publicTest(inta){m=a;}5)publicstaticvoidmain(Stringargs[]){6)Testtl,t2;7)intj,ký8)j=O;k=O;9)tl=newTest();10)t2=newTest(j,k);ID}12}A第•3B第•第5c•第6D•10(34)ᑡḄᙠ◞!"#“Hello"*+,ᑏᙠ.ᑜ012*34᦮6789Ḅ:;()஺publicclassTestimplementsRunnable{publicstaticvoidmain(Stringargs[]){Testt=newTest();Threadtt=newThread(t);tt.start();)publicvoidrun(){for(;;){try(

114}catch(e){}System,put.println(z*Helloz/);))A.sleep(lOOO)InterruptedExceptionB.sleep(lOOO)InterruptedExceptionC.Thread,sleep(1000)RuntimeExceptionD.Thread,sleep(1000)InterruptedException(35)▅cᑡdṹfpublicclassPerson{intarr[]=newint[10];publicstaticvoidmain(Stringargs[]){System,out.println(arr[l]);))78Ḅhi()oA.jklmno┯qB.jkl78*9lmno┯qC.rstD.rsu(36)ᙠJava.*wxy!⁚dṹ{|᡻Ḅ()஺A.ᚗᦈᘤB.C.jkᘤD.0ᑴ(37)ᑡ.*78Ḅ()oA.Java:Ḅ᪗"ᑖᜧᑏḄB.ᦻpublicC.ᦻ᡽.jarD.ᦻ.publicḄᦪ¢▲(38)ᑡ¥¦ᔠiḄJava᪗"()0A._catB.5booksC.+staticD.-3.14159(14)ᙠJava.*⊤ᣚ"Ḅ¯°!"()»A.

115B.\fC.'n'D.\dd(39)ᙠJava.*ᵫJavajkᘤµ¶·ᐭ*¹º◤ᙠ.ᵨimport·ᐭḄᒹ()oA.java,appletB.java,awtC.java,utilD.java,lang¾ஹ,u⚪(1)yÁ#ᓄÃÄ᧕ᙢ᡽ᡂÈᢝJavayÁḄ()*ÊËÌÍyÁÎÏ.ÐÑḄ⊡ᐙÔÕ.(2)VectorḄyÁØÙcapacityÚcapacityincrementÛÜᩭᦋßàᔠḄÄá*ᐸ.capacity⊤àᔠᨬÄäḄ(),capacityIncrement⊤åæçèÄá*æç.

116(3)ᑡḄᑨêëìᔲîì,ïᙠð0ᜐ,ᐭ〉óᑁÄ*3+789.importjava.io.publicclassLeapYear{publicstaticvoidmain(Stringarge[])throwslOException{InputStreamReaderir;BufferdeReadwein;ir=newInputStreamReader(System,in);in=newBufferedReader(ir);System.out.printin(“rᐭì÷:")ùStrings=();intyear=Integer.parselnt(s);if(year%4==0&&year%100!=0//year%400==0)(System,out.println(****+year+z/^^lW^.z*)ù}else(System.out.println(/**z+year+z*^^5^|i]^..z);)})(4)☢ᦪᐗᯠᢥ⌮.ᙠ"#ᜐ%ᐭ〉(ᑁ*+,-./0.importjava.io.*;publicclassArrayTest(publicstaticvoidmain(Stringargs[]){inti;inta[]=newint[5];for(i=0;i<5;i++)for(();i>=0;i—)System,out.println(஻a[஻+i+஻]=஻a[i]);))(5)ᑡḄV,WXᐭYZ[/0“Z[Welcomeyou!”.`᝞ᐭ“bcWelcomeyou!”.ᙠ☢"#ᜐ%ᐭ-dḄef[+gh-d/0.importjava,awt,importjava.awt.event.publicclasswelcomenYou{

117publicstaticvoidmain(Stringargs[])(newFramelnOut();})classFramelnOutextendsFrameimplementsActionListener(Labelprompt;TextFieldinput,output;Buttonbtnn;voidFramlnOut0{prompt=newLabelC'Pleaseinputyourname");input=newTextField(lO);output=newTextField(25);btnn=newButton("Class");()(newFlowLayout());add(prompt);add(input);add(output);add(btnn);input.addActionListener(this);btnn.addActionListener(this);setSize(300.200);show();)publicvoidactionperformed(ActionEvente)(if(e.getSource0==input)output.setText(input.getText()+Z/Welcomeyou!");else(disposeO;system,exit(0);)))(6)z{|/0Java◤⌕Ḅc⌕()ஹ()()o᝞YJavaAppletᦻᨵYḄ[MyApplet,ᑣMyAppletW()ḄᦻḄᦻ[()஺

118(8)᝞YJavaAppletᦻᨵ3ᑣ+ᵨSunḄJDK¡ᘤ()¡ᦻ£¤¥()ᦻ[|[¦§¨᡽ª[()Ḅ«⁚ṹᦻ஺®ᙠJavaḄ¯°ᦪ±²char²³ᵨUnicodeṹeᫀUnicodeṹᓰᵨ()«⁚ᑁ¶·¸᪵º»Wᦻ«¼½W¾ᦻ«¼¿Wᓰᵨ()«⁚ᑁ¶·஺(10)Àx=2,ᑣ⊤ÂÃ(x++)/3ḄW()஺(11)Äx=5,y=10,ᑣxீyx>=yḄÆÇᑖÉ()()஺(12)()efWYÊËᨵefᜮÍᨵᐹÏefÏÐÑÒÓḄefefᙠÔÕÖ஺()efW×,Ø(ÙḄÚÛḄef஺(13)ÜÝY[MyPackageḄᒹḄßàW()ßàáâᙠḄãäX()0(14)ÀᨵᦪXintMylntArrayt]={10,20,30,40,50,60,70);ᑣ᡻0hæßàḄçW()஺ints=0;for(inti=0;i᡻$஺(23)@▅BCᑡEṹᯠ;HḄ᡻$IJ⊡ᐙM᦮஺publicclassthrowsException{staticvoidProc(intsei)throwsArithmeticException,ArraylndexOutOfBoundsException{System,out.printin(/zInSituation^+sel);if(sel==0){System,out.println(z/noExceptioncaught/z);return;}elseif(sel==l){intiArray[]=newint[4];iArray[1]=3;

119publicstaticvoidmain(Stringargs[]){try{Proc(0);Procপ+}catch(ArraylndexOutOfBoundsExceptione){System,out.printin(zCatchzz+e);}finally{System.out.printin(zinProcfinally");))᡻$IJvInSituation0noExceptioncaught()inProcfinallyxᫀvInSituation1(24)}8ᵨThreadt=newThread(r)⊤vrinstanceofThreadḄ()஺᪛www.516fc.netwwwszpfmr.netᦿwww.szquban.net◀wwwszchuzhou.comῃwww.sztuomao.com.cnwww.xinyie.comᓭwww.jslycs.comᓭwww.penqiang.net¢ஹ£x⚪1ஹStringᨬ¥¦Ḅᦪ¨©ᔩ«xv¥¦ᦪ¨©ᒹbyteஹint>char>long>floatஹdouble>boolean%shortojava.lang.Stringfinal©Ḅ¯°±"²³´µஹ±¶·ᦋµ஺¹º»ᦔ᳛⁚ḕ¿ÀᡃÂÃÄᵨStringBuffer஺2ஹ☢ᔣÆÇḄᱯÉᨵÊËÌ☢«£ÍᱯÉ஺3ஹint%IntegerᨵÏÐÑ«xvJavaºÓÔ±ÕḄ©vÖᵨ©%×>©(ᡈᑁÚ©)஺IntjavaḄ×>ᦪ¨©IntegerjavaintºÓḄÛÜ஺Java×>©ºÓ¹ÛÜ஺Öᵨ©%×>©Ḅ$Mᐰ±ÕÞßàÂᐹᨵ±ÕḄ-â஺Öᵨ©%×>©ᐹᨵ±ÕḄᱯÉ%ᵨ3àÂᒹvᜧä%åæç⚪µ©²Ê©Ḅᦪ¨I᪀éê}Öᵨ©%×>©ᵨëìḄíîᦪ¨ᡠᢣñḄòḕ஺ÆÇÖᵨíîóôḄòḕnull,õ×>©íîóôḄòḕöàÂḄ©ᨵᐵ஺4ஹString%StringBufferḄÑ«xvJAVAùúºÓ¹ÔvString%StringBuffer,àÂ"²êé%ûë(,üᓽᒹþÿḄᦪ஺StringᦪᦋḄ

120஺StringBufferḄᦋ஺!"#⍝ᦪ⌕ᦋḄ&᎛"()*ᵨStringBufferᐺ.ᙢ0")*ᵨStringBuffersᩭ30᝱᪀⌼ᦪ஺5ஹ9&:;<=>:;ᨵ@:ABCD:;⊤FGH9IGJKLMḄNO;P᝱09&:;⊤FQRSḄT;UVJK⍗ᑮḄ:;0Y=Z;[9┯]஺javaabᘤ⌕defghijkLKlmḄN9&:;0nYo⌕dghijkLpqᣓsḄ9&:;஺6^final,finally,finalizeḄz{?CDfinalᵨ}ij~ឋ0ef0ᑖ{⊤F~ឋ0ef⌚0஺finallyY:;ᜐᳮ᪀Ḅ=ᑖ0⊤FY᡻஺finalizeYObjectḄ=ef0ᙠᚗᦈᘤ᡻Ḅ&᎛ᵨqᦈḄef0)⌚efᚗᦈ&Ḅᐸᦈ0᝞ᐵ£ᦻ¥¦஺7ஹsleep0wait()ᨵ¬z{BCDsleepY®G(Thread)Ḅef0²³®Gᨚµ᡻ᢣ·&¸0¹᡻S¹ᐸ®G0nYº»P᝱¼ᯠ¾ᢝ0ᑮ&ÀÁ3ឮÃ஺ᵨsleepÄÅ┝஺waitYObjectḄef0ᵨwaitef²³Ç®GÅÈ┝0ᐭ¦ÊḄ¦Ê┝·Ë0Ìᨵ┐lLnotifyef(ᡈnotifyAll)ÀÇ®GÑᐭ┝·ËÒᜓsÔ┝ᐭ9P᝱஺8ஹOverloadOverrideḄz{஺OverloadedḄefYᔲ)ᦋ×Ḅ.BCDefḄØᑏOverridingØÚOverloadingYJavaÜ᝱ឋḄA⊤M஺ØᑏOverridingY᱄<Þ߸Ü᝱ឋḄ,•Z⊤M0ØÚOverloadingY=JÜ᝱ឋḄ=Z⊤M஺᝞áᙠÞJ·âãef<ᐸ᱄ᨵäAḄåæçᦪ0ᡃéêëefqØᑏ(Overriding)஺ÞḄ*ᵨef&0ìᵨÞJḄ·â0íî0᱄JḄ·â᝞Aq“ðñ”஺᝞áᙠ=J·âÜAåḄef0íéᡈᨵAḄçᦪᦪᡈᨵAḄçᦪ.0ᑣæôefḄØÚ(Overloading)஺OverloadedḄefY)ᦋ×Ḅ.஺9ஹabstractclassinterfaceᨵ¬z{BCDijefḄöᙠ÷øMíḄqùúû(abstractclass),íᵨ}⌕üý=þMãÿḄᙠḄ஺abstractḄ஺ᯠ!"#$%&'ᐸ)*$%+,-.ᢣᔣᐹ23Ḅ$%஺ᨵ+,᪀⌼7ᦪᡈ+,☟᝱஺AbstractḄ3.=᱄Ḅᡠᨵ+,@Aᔲᑣ.=D*+,஺E!FGᙠ3஺H⍝ᐸḄᐸ."#ᙠJK஺LM(interface)*+,Ḅ&2஺ᙠLMᡠᨵT*+,Ḅ஺UVWឋ"YZJ᪵ḄLM!\]஺LMḄᡠᨵT*+,Ḅ^ᨵ$%ᨵ_`2஺LMa"#bcstaticfinalᡂᕒ&'஺LMḄh3ij◀lmLMbcVW஺nᱯpLMq.bc(ᓽs_`2tu)ᡠᨵJvLMḄ஺ᯠw."#ᙠlLMḄḄxyz,{|ᵨLMḄ஺ᵫᨵ+,.ᐕᵨLMᵨ&'Ḅ)஺Y

121Ḅ᝱ὶsᦔ஺ᵨ"#ᣚᑮLM)ᡈmLM)ᣚinstanceof"#ᵨᩭbz,Ḅ*ᔲlLM஺10ஹ$%_*ᵨrun()*start஺$%_*|ᵨstart஺_ᡠF⊤Ḅ¡¢ᜐᳮ¥ᜐ"¦᝱J§ᕡḼ."#ᵫJVM|᡻஺J§ᕡḼ_¯°±ᓽ஺run()"#²³´⌨¶Ḅ᪗¸ᩭ¹º$%_஺11ஹLM*ᔲ"VWLM+,*ᔲ"(implements)LM+,*ᔲ"VW2(concreteclass)?LM"#VWLM஺+,"#(implements)LM+,*ᔲ"VW2¾@*2³´ᨵ¿Ḅ᪀⌼7ᦪ஺12ஹᦪÁᨵ^ᨵlength஺J%Stringᨵ^ᨵlength஺J%ᦪÁ^ᨵlength஺J%ᨵlengthḄÅឋ஺Stringᨵᨵlength()J%஺13ஹ᪀⌼ᘤConstructor*ᔲ"Éoverride?᪀⌼ᘤConstructorÉVWÌÍÎᑏOverriding,"#ÉÎÒOverloading014ஹ*ᔲ"#VWStringString*finalᦑ"#VW஺15ஹswtich*ᔲᵨᙠbyte{*ᔲᵨᙠlong{*ᔲᵨᙠString±?switch(exprl)exprl*$%᦮ᦪ⊤ÛÜ஺ÌÍÝ⌴tswitchßcaseàáḄâᦪã*intஹshort>charᡈὅbyte஺long,stringTᵨswticho16>try{}éᨵ$%returnàáêëìíᙠJ%trywḄfinally{}éḄcode°°É᡻îëq᎛É᡻ᙠreturn¾*w°᡻ᙠreturn¾᡻஺17ஹñòJavaU᝱ឋḄᭆô◚öஹ⌚øßÎÒḄᭆôùᵨqãú§Ḅû⚪஺U᝱ឋᙠ$%"#bcU%ýᨵ☟᝱U᝱ឋß᝱U᝱ឋ஺◚ö3Îþbcl᱄Ḅýᡂᕒ&'஺É◚öḄ᱄ᡂᕒ&'ᙠ3ÿᯠᓰᨵ஺⌚᱄Ḅᡂᕒ⌕ஹᦪ!"#$%஺&◚()*+,-ᣚᣵḄ᱄0◀᱄ᙠ3ᓰᨵḄ஺4ᙠ563768ᦪ)Ḅᦪ)9ᢣ6ᦪஹ#ᡈ<=)஺>?@⚗)B⌚᱄Ḅstaticfinal஺KL◚(᱄Ḅstaticᓽᙠ3NOstatic஺PStatic)B◚(RB⌚஺ST⌚᱄Ḅabstract஺18ஹYZ9@[ஹ@[\@[]^ᘤ`abcᵨ@[]^ᘤef@[ᜐᳮḄij஺k@[lm☢Ḅopqr᝞ᢥuஹᓫwx᪗ஹx᪗z{|஺@[\@[Ḅ}~ὅ9o5[᝞ᢥ|஺

122@[]^ᘤ9o@[Ḅᐸ3]^Ḅ@[~+⌕ᵨḄ஺@[ᜐᳮijᵫ☢3ᡂজNO◤⌕Ḅ@[]^ᘤ஺ঝ@[\>56@[]^ᘤ஺ঞNO3@[ᜐᳮ஺19ஹabJava3᪀⌼Ḅᭆᱯ஺k᪀⌼᪀⌼95pᱯ¡Ḅᵨ¢£¤ᓄl¦஺ᱯজ᪀⌼&KLᨵᦪ§K¨ᦪ஺ঝ᪀⌼©ᨵ!"ªᙠ«§)◤⌕ᑏvoid஺ঞ®l¦+¯{ᵨ᪀⌼஺টᵨᡝᙠj=3)B²ᵨ᪀⌼RBinewqr³ᵨ஺ঠ56KLᨵ76᪀⌼8ᦪST)஺ᡠ¶ᦪ)9ᢣ:ড3KL)᪀⌼*+Java¹º56»¼Ḅ¨ᦪ᪀⌼20ஹabJava3ḄᭆḄឋ¾`kJava¿ÀÁRBᓫÂÃ8KL7ÂÃ஺3Ḅ$9ĦḄᡠᨵÅ$9Æ஺Ç*KLÈr9©ᨵḄÆḄÉᔠ஺cᵨË⌕9ÌÍJava¿À)Îᢝ7ÂÃḄÐ⚪஺ឋ¾জ)¹ºÒṹᵨឋ஺Ç3Ḅ$9©ᨵḄÇ*ᡠᨵḄÔ$⌕¯ÕÖᑏ஺ঝKLi7ÂÃef᡽Ø஺ঞ)BᓣÚᓽ¹ºᵨᡝḄ)BÛᦋÝ஺Þஹ▅àj=ᑏáâ1ஹclassVI{inta=l;voidml(){System,out.printin(a);})classElextendsVI{inta=2,b=3,c;voidm2(){System.out.printin(a);})classH{publicstaticvoidmain(String[]s){Elel=newEl();el.ml();el.m2();})2ஹclassVI{publicintx=2;Vl(){System.out.println(,'Vr,);})classV2extendsVI{publicintx=3;V2(){System.out.println(nV2n);}

123classH{publicstaticvoidmain(String[]s){VIel=newV2();System.out.println(el.x);}}3ஹimportjava.io.*;publicclassabc{publicstaticvoidmain(Stringargs[]){ABs=newAB(nHello!n);System.out.println(s.toString());))classAB{Stringsi;Strings2;AB(Stringstrl,Stringstr2){si=strl;s2=str2;}publicStringtoString(){returnsl+s2;})4ஹimportjava.io.*;publicclassabc{publicstaticvoidmain(Stringargs[]){inti,s=0;inta[]={10,20,30,40,50,60,70,80,90);for(i=0;i

1246ஹclassVI{inta=3;voidml(){System,out.printin(a);})classElextendsVI{inta=5,b=3,c;voidm2(){System,out.printin(a);})classH{publicstaticvoidmain(String[]s){Elel=newEl();el.ml();el.m2();})ஹ▅Ḅ1ஹpublicclassH{publicstaticvoidmain(Stringargs[]){FactN=newFact(4);System.out.print(N.fact());})classFact{intn;Fact(intnn){n=nn;}intfact(){intiᡝ1;for(i=l;i<=n;i+4-)f=f*i;returnf;})2ஹpublicclassH{publicstaticvoidmain(Stringargs[]){inti,Max,Min;inta[]={12,67,8,98,23,56,124,55,99,100};Max=a[0];Min=a[0];fbr(i=l;iMax)Max=a[i];}System.out.print(Max+nH+Min);}}importjava.io.*;publicclassabc{publicstaticvoidmain(Stringargs[])

125{SubClasssb=newSubClass();System.out.println(sb.max());))classSuperClass{inta=10,b=20;}classSubClassextendsSuperClass{intmax(){return((a>b)?a:b);}}3ஹimportjava.io.*;publicclassabc(publicstaticvoidmain(Stringargs[]){inti,n=10,max=0,min=0,temp=0;try(BufferedReaderbr=newBufferedReader(newInputStreamReader(System,in));max=min=Integer,parselnt(br.readLine());}catch(lOExceptione){};for(i=2;i<=n;i++){try{BufferedReaderbr=newBufferedReader(newInputStreamReader(System,in));temp=Integer,parselnt(br.readLine());if(temp>max)max=temp;if(temp

126min=஻+min);))4ஹimportjava.awt.*;publicclassabc{publicstaticvoidmain(Stringargs[]){newFrameOut();}fclassFrameOutextendsFrame{Buttonbtn;FrameOut(){super(nbuttonn);btn=newButton("clickH);setLayout(newFlowLayout());add(btn);setSize(300,200);show();

1275ஹpublicclassSum{publicstaticvoidmain(Stringargs[]){doublesum=0.0;for(inti=1;iv=100;i++)sum+=l.OZ(double)i;System.out.println(nsum=n+sum);6ஹimportjava.io.*;publicclassReverse{publicstaticvoidmain(Stringargs[]){inti,n=10;inta[]=newint[10];for(i=0;i=0;i-----)System.out.print(a[i]+n")æSystem.out.println();çஹ▅àj=ᑏáâ1ஹèéAAḄê~B,⌕1ëAᨵì6ᦪíᡂᕒabî$int#ëæB3ÂÃA3Ḅab,ï¯ÕḄᦪíᡂᕒcint#ë஺2Aðñòᨵì6ᦪḄ᪀⌼lab£¤ᓄ஺3Bðñòᨵ56ᦪḄ᪀⌼lc£¤ᓄ஺4óᡂËôᙠËô3ᵨBel=newB5®l¦õaஹbஹcᑖ÷£¤ᓄᡂ3ஹ4ஹ5,ᨬùãúûüḄ஺2ஹÖᑏ5"^ÿ☢ḄJavaApplication⌕᝞1ᵨᐭḄreadLine஺ᦈᐭḄ10᦮ᦪ஺2ᵨ!⌴#᣸᣸%&'(ᙠ☢*஺3ஹ,ᑏ./0☢ḄApplet1ᵨ2HTMLᦻ456ᶍ89⌕᝞1ᙠApplet☢*:;<TextField=4ஹ>Label=4?.Button=4᝞/ᡠ(஺2ᙠ>TextField=4Aᐭ>᦮ᦪB᪗DᓫFButton=4ᙠG<TextField=4A'(HIḄ?஺4ஹ,ᑏ.ᑨKᐭḄLMᔲOPL஺5ஹ,ᑏ.Qᦪ=ARᐗTUVᯠXᢥ⌮[஺

1286ஹᐭ.\]^X[“\]Welcomeyou!”.`᝞ᐭa<ᑣ%&O“a᦮ᦪghHIḄᜧjkᙠᵨᡝᢥ“gh”ᢥmXnAppletA'(Ḅ“oᐜᐭ>qghḄ᦮ᦪ”ᦋO“>᦮ᦪAᨬᜧVMx”xM>ᦪAḄᨬᜧV.8ஹuvA?AḄwxB,⌕19Aᨵ>ᦪzᡂᕒa?b2}Oint~9BAAAḄa?b,Ḅᦪzᡂᕒcint~9஺2OA:;ᨵ>ᦪḄ᪀⌼Qa?bᓄ஺3OB:;ᨵ.ᦪḄ᪀⌼Qcᓄ஺4ᡂᙠAᵨBel=newB5Qaஹbஹcᑖᓄᡂ3ஹ4ஹ5,ᨬX[HIḄ?஺

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

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

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