锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲第一福利网站在线观看,亚洲av无码无在线观看红杏,亚洲国产a∨无码中文777 http://m.tkk7.com/wangjc0801/category/37128.html浠庡ご鐪婮avazh-cnFri, 23 Jan 2009 03:19:46 GMTFri, 23 Jan 2009 03:19:46 GMT60Java闆嗗悎http://m.tkk7.com/wangjc0801/archive/2009/01/21/252278.htmlwangjcwangjcWed, 21 Jan 2009 15:31:00 GMThttp://m.tkk7.com/wangjc0801/archive/2009/01/21/252278.htmlhttp://m.tkk7.com/wangjc0801/comments/252278.htmlhttp://m.tkk7.com/wangjc0801/archive/2009/01/21/252278.html#Feedback0http://m.tkk7.com/wangjc0801/comments/commentRss/252278.htmlhttp://m.tkk7.com/wangjc0801/services/trackbacks/252278.html1. java闆嗗悎綾葷敤浜庡瓨鏀炬暟閲忎笉絳夌殑澶氫釜瀵硅薄

2. Java闆嗗悎鍙垎涓轟笁綾? Set, List, Map.鍏朵腑Set浠h〃鏃犲簭鐨?涓嶅彲閲嶅鐨勯泦鍚?List浠h〃鏈夊簭鐨?鍙噸澶嶇殑闆嗗悎;Map浠h〃鍏鋒湁鏄犲皠鍏崇郴鐨勯泦鍚?

3. java1.5涔嬪墠,java闆嗗悎浼?xì)涓㈠け闆嗗悎涓璞$殑鏁版嵁绫诲?鎶婃墍鏈夊璞″綋鎴怬bject綾誨瀷澶勭悊.

4. java闆嗗悎涓昏鐢變袱涓帴鍙f淳鐢熻屽嚭:Collection鍜孧ap

=================================================================

 

1. Collection鎺ュ彛

    Iterator鎺ュ彛闅愯棌浜嗗悇縐岰onllection瀹炵幇綾葷殑搴曞眰緇嗚妭,鍚戝簲鐢ㄧ▼搴忔彁渚涗簡閬嶅巻Conllection闆嗗悎鐨勭粺涓緙栫▼鎺ュ彛.Iterator浠呯敤浜庨亶鍘嗛泦鍚?涓斿繀欏諱緷闄勪簬Collection瀵硅薄.

    Iterator鎺ュ彛閲囩敤蹇熷け璐ユ満鍒?涓鏃﹀湪榪唬鐨勬椂鍊欐嫻嬪埌璇ラ泦鍚堝凡緇忚淇敼,閫氬父鏄▼搴忎腑鐨勫彟澶栫殑綰跨▼,紼嬪簭绔嬪嵆寮曞彂寮傚父.

    浠g爜娓呭崟:CollectionTest.java

package Test.test;
 
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
 
public class CollectionTest {
 
    public static void main(String[] args) {
        
        Collection books = new HashSet();
        
        books.add("Java鍩虹");
        books.add("J2EE鍩虹");
        books.add("J2EE楂樼駭");
        
        System.out.println(books);//Collection鐨勫疄鐜扮被閲嶅啓浜唗oString()鏂規(guī)硶
        Iterator it = books.iterator();
        while (it.hasNext()) {
            String book = (String)it.next();
            System.out.println("book:"+book);
            if ("J2EE鍩虹".equals(book)) {
                //it.remove();//remove鏂規(guī)硶鍒犻櫎涓婁竴嬈ext鏂規(guī)硶榪斿洖鐨勫厓绱?/span>
                
                books.remove(book);
                // 鍦↖terator 榪唬books鏃?鍙︿竴涓嚎紼嬪幓淇敼books鍏冪礌,鍒欎細(xì)寮曞彂java.util.ConcurrentModificationException
                // 寮傚父,鑰屽悓鏍風(fēng)殑濡傛灉瑕佸垹闄ょ殑鏄渶鍚庝竴涓璞?灝變笉浼?xì)鍙戠敓寮傚?
            }
        }
        
        System.out.println(books);
 
    }
 
}



wangjc 2009-01-21 23:31 鍙戣〃璇勮
]]>
Java綾?/title><link>http://m.tkk7.com/wangjc0801/archive/2009/01/14/251359.html</link><dc:creator>wangjc</dc:creator><author>wangjc</author><pubDate>Wed, 14 Jan 2009 15:01:00 GMT</pubDate><guid>http://m.tkk7.com/wangjc0801/archive/2009/01/14/251359.html</guid><wfw:comment>http://m.tkk7.com/wangjc0801/comments/251359.html</wfw:comment><comments>http://m.tkk7.com/wangjc0801/archive/2009/01/14/251359.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/wangjc0801/comments/commentRss/251359.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/wangjc0801/services/trackbacks/251359.html</trackback:ping><description><![CDATA[<p><font color="#0000ff" size="2"></font></p> <p><font color="#0000ff" size="2">1. 綾誨拰瀵硅薄</font> <p><font color="#0000ff" size="2">   </font> <p><font color="#0000ff" size="2">     綾誨彲浠ヨ涓烘槸鑷畾涔夌殑鏁版嵁綾誨瀷,.綾葷敤浜庢弿榪版煇涓綾誨璞$殑鍏卞悓鐗瑰緛,瀵硅薄鏄被鐨勫叿浣撳瓨鍦?</font> <p><font color="#0000ff" size="2"></font>  <p><font color="#0000ff" size="2">java涓殑瀵硅薄鍙?qiáng)鍏跺睘鎬ф暟鎹槸瀛樻斁鍦ㄥ爢(heap)鍐呭瓨涓殑,鑰屽紩鐢ㄥ彉閲忓垯鏄瓨鏀懼湪鏍堝唴瀛樹腑鐨?</font> <p><font color="#0000ff" size="2">    Person p = new Person();</font> <p><font color="#0000ff" size="2">    緋葷粺浼?xì)鐢熸垚涓や釜瀹炰?涓涓槸寮曠敤鍙橀噺p,涓涓槸Person瀵硅薄.鏍堝唴瀛樹腑鐨勫紩鐢ㄥ彉閲弍鎸囧悜鍫嗗唴瀛樹腑鐨凱erson瀵硅薄,鍙橀噺p鍙槸瀛樺偍浜嗕竴涓湴鍧鍊?鏈韓涓嶅寘鍚換浣曞疄闄呮暟鎹?鍫嗗唴瀛樹腑鐨勬暟鎹笉鍏佽鐩存帴璁塊棶,鍙兘閫氳繃璇ュ璞$殑寮曠敤鍘昏闂瀵硅薄.</font> <p><font color="#0000ff" size="2">    Person p1 = p;</font> <p><font color="#0000ff" size="2">    灝唒鍙橀噺璧嬬粰p1,涔熷氨鏄皢p鍙橀噺淇濆瓨鐨勫湴鍧鍊艱祴緇檖1.榪欐牱p1涔熸寚鍚戜簡鍫嗗唴瀛樹腑鐨勫悓涓涓璞?榪欐牱涓嶇鏄氳繃p榪樻槸p1璁塊棶瀵硅薄鐨勫睘鎬у拰鏂規(guī)硶,緇撴灉閮芥槸璁塊棶鍚屼竴涓璞$殑灞炴у拰鏂規(guī)硶,榪斿洖鐨勭粨鏋滈兘鏄竴鏍風(fēng)殑.涔熷氨鏄鍫嗗唴瀛樹腑鐨勫璞″彲浠ユ湁澶氫釜寮曠敤.</font> <p><font color="#0000ff" size="2">    p = null;</font> <p><font color="#0000ff" size="2">    褰撳爢鍐呭瓨涓殑鏌愪釜瀵硅薄娌℃湁寮曠敤鎵ц瀹冩椂,紼嬪簭灝嗘棤娉曞啀璁塊棶鍒拌繖涓璞?榪欎釜瀵硅薄涔熷氨鏄棤鐢ㄧ殑浜?鍨冨溇鍥炴敹鏈哄埗灝嗗洖鏀惰繖涓璞?閲婃斁璇ュ璞℃墍鍗犵敤鐨勫唴瀛樼┖闂?鍥犳,濡傛灉闇瑕佸瀮鍦懼洖鏀舵満鍒跺洖鏀舵煇涓璞?鍙鍒囨柇璇ュ璞$殑鎵鏈夊紩鐢ㄥ嵆鍙?涔熷氨鏄皢鐩稿叧鐨勫紩鐢ㄨ祴涓簄ull.</font> <p><font color="#0000ff" size="2">鍐呭瓨紺烘剰鍥?</font></p> <p></p> <div id="oyyaewo" class="wlWriterEditableSmartContent" id="scid:51CF81A4-8F44-4a2c-8837-198C090B9994:2ae6a00c-fdb8-4900-a7a7-40742adc1c42" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><p><a atomicselection="true"><img style="border-right: 2px; border-top: 2px; border-left: 2px; border-bottom: 2px" height="233" src="http://lh6.ggpht.com/_L3nkUmUbBp0/SWQEPuAD9wI/AAAAAAAAACs/1V-hgK2Rwsk/s400/%E5%AF%B9%E8%B1%A1.jpg" width="400"></a></p></div> <p></p> <p><font color="#0000ff" size="2">2. 闈㈠悜瀵硅薄鐨勭壒寰?/font></p> <p><font color="#0000ff" size="2">    1. 灝佽</font></p> <p><font color="#0000ff" size="2">     瀵硅薄鐨勭姸鎬佷俊鎭殣钘忓湪瀵硅薄鍐呴儴,涓嶅厑璁稿閮ㄧ▼搴忕洿鎺ヨ闂璞″唴閮ㄤ俊鎭?鑰屾槸閫氳繃璇ョ被鎵鎻愪緵鐨勬柟娉曟潵瀹炵幇瀵瑰唴閮ㄤ俊鎭殑鎿嶄綔鍜岃闂?綾諱技瀹㈣涓栫晫涓殑灞炴ч兘鏄殣钘忓湪瀵硅薄鍐呴儴鐨?澶栭儴鏃犳硶鐩存帴鎿嶄綔鍜屼慨鏀?鑹ソ鐨勫皝瑁呮槸閫氳繃瀵瑰鏆撮湶瓚沖鐨勬柟娉曟潵鎿嶄綔鍜岃闂被鐨勫唴閮ㄤ俊鎭?</font></p> <p><font color="#0000ff" size="2">銆銆璁塊棶鎺у埗綰у埆浠巔rivate鍒皃ublic閫愭鍙樺ぇ</font></p> <p></p> <div id="8esqqok" class="wlWriterEditableSmartContent" id="scid:51CF81A4-8F44-4a2c-8837-198C090B9994:96ec8c0b-e73c-4c44-89aa-65685fb2077a" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><p><a atomicselection="true"><img style="border-right: 2px; border-top: 2px; border-left: 2px; border-bottom: 2px" height="27" src="http://lh4.ggpht.com/_L3nkUmUbBp0/SWyr2xk84WI/AAAAAAAAAKg/ux9ikE68j6Q/s400/java%E8%AE%BF%E9%97%AE%E6%8E%A7%E5%88%B6%E7%AC%A6.jpg" width="400"></a></p></div> <p></p> <p></p> <div id="0oaymes" class="wlWriterEditableSmartContent" id="scid:51CF81A4-8F44-4a2c-8837-198C090B9994:3f9deb35-f919-48c7-9f46-55b81a7b0f4c" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><p><a atomicselection="true"><img style="border-right: 2px; border-top: 2px; border-left: 2px; border-bottom: 2px" height="339" src="http://lh4.ggpht.com/_L3nkUmUbBp0/SWyt17JMSFI/AAAAAAAAAKk/4EzuPZQ7G24/s400/%E8%AE%BF%E9%97%AE%E6%8E%A7%E5%88%B6%E7%AC%A6%E7%BA%A7%E5%88%AB%E8%A1%A8.jpg" width="326"></a></p></div> <p></p> <p><font color="#0000ff" size="2"></font> </p> <p><font color="#0000ff" size="2">    2. 緇ф壙</font></p> <p><font color="#0000ff" size="2">       1. java涓嶆敮鎸佸閲嶇戶鎵?姣忎釜瀛愮被鍙湁涓涓洿鎺ョ埗綾?/font></p> <p><font color="#0000ff" size="2">       2. Object綾繪槸涓鍒囩被鐨勭埗綾?/font></p> <p><font color="#0000ff" size="2">       3. 瀛愮被緇ф壙涓嶈兘緇ф壙鐖剁被鐨勭鏈夌殑鎴愬憳鍙橀噺鍜屾垚鍛樻柟娉?</font></p> <p><font color="#0000ff" size="2">           鍦ㄦ娊璞$被涓畾涔変簡縐佹湁鐨勬垚鍛樻柟娉曟垨鍙橀噺,瀛愮被涓嶈兘璁塊棶鍒扮埗綾葷殑縐佹湁鎴愬憳,鎵浠ュ瓙綾諱腑閲嶅啓鐖剁被鐨勭鏈夋柟娉?瀹為檯涓婃槸鏂板緩浜嗕竴涓柟娉?鍦ㄦ帴鍙e畾涔変腑鐨勬垚鍛樻槸涓嶈兘涓虹鏈夌殑,鍚﹀垯緙栬瘧浼?xì)鎶ラ?鍥犱負(fù)鎺ュ彛鏄敤鏉ュ叕寮鐨?縐佹湁鐨勫彉閲忓拰鏂規(guī)硶涓嶈兘琚戶鎵挎垨瀹炵幇.</font></p> <p><font color="#0000ff" size="2">       4. 瑕嗙洊鍜岃瑕嗙洊鐨勬柟娉曞繀欏誨悓鏄疄渚嬫柟娉曟垨鍚屾椂綾繪柟娉?/font></p> <p><font color="#0000ff" size="2">       5. 瀛愮被涓殑鍙橀噺鍙互瑕嗙洊鐖剁被涓悓鍚嶇殑鍙橀噺,浣嗗茍涓嶆槸瑕嗙洊,鑰屽彧鏄睆钄?鐖剁被鐨勫彉閲忓茍鏈敼鍙?/font></p> <p><font color="#0000ff" size="2">       6. 璋冪敤瀛愮被鏋勯犳柟娉曚箣鍓?緋葷粺浼?xì)鍏堣皟鐢ㄧ埗绫荤殑鏋勯犳柟娉?濡傛灉鏈夊涓埗綾?鍒欎粠涓婂埌涓嬩緷嬈¤皟鐢?/font></p> <p><font color="#0000ff" size="2">       7. 鍐呭瓨鏈哄埗涓?鐖剁被鍜屽瓙綾繪槸鍗犵敤鍚屼竴鍧楀唴瀛樼┖闂寸殑,鍙槸瀛愮被鍦ㄧ埗綾葷殑鍩虹涓婂鍔犺嚜宸辯殑灞炴у拰鏂規(guī)硶.</font></p> <p><font color="#0000ff" size="2">       8. 鍦ㄥ瓙綾諱腑鍙氳繃super璁塊棶鐖剁被涓殑鎴愬憳.</font></p> <p><font color="#0000ff" size="2">       9. 緋葷粺鍒涘緩鏌愪釜綾葷殑瀵硅薄鏃?緋葷粺鎬諱細(xì)闅愬紡鍦板垱寤鴻綾葷埗綾葷殑瀵硅薄.鍦ㄥ瓙綾繪柟娉曚腑,super鎸囧悜璇ユ柟娉曡皟鐢ㄨ呯殑瀛愮被瀵硅薄鐨勭埗綾誨璞?</font></p> <p><font color="#0000ff" size="2">浠g爜娓呭崟: 緇ф壙</font></p> <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; max-height: 200px"> <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">abstract</span> <span style="color: #0000ff">class</span> A { </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <span style="color: #0000ff">int</span> i=1; </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> printI() { </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(<span style="color: #006080">"i="</span>+i); </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> } </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">} </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> B extends A{ </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> <span style="color: #0000ff">int</span> i=2; </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> printI() {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> super.printI();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> main(String[] args) { </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> B b=<span style="color: #0000ff">new</span> B(); </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> b.printI(); <span style="color: #008000">//i=1;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> } </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> } </pre></div></div> <p> <font color="#0000ff" size="2">3. 澶氭?/font></p> <p><font color="#0000ff" size="2">     1. 鐩稿悓綾誨瀷鐨勫彉閲?鎵ц鍚屼竴涓柟娉曟椂鍛堢幇鍑轟笉鍚岀殑琛屼負(fù)鐗瑰緛,灝辨槸澶氭?澶氭佸彂鐢熷湪緙栬瘧鏃剁被鍨嬪拰榪愯鏃剁被鍨嬩笉涓鑷存椂.</font></p> <p><font color="#0000ff" size="2">     2. 寮曠敤綾誨瀷鍦ㄧ紪璇戦樁孌靛彧鑳借皟鐢ㄥ叾緙栬瘧鏃剁被鍨嬫墍鍏鋒湁鐨勬柟娉?榪愯鏃跺垯鎵ц瀹冭繍琛屾椂綾誨瀷鎵鍏鋒湁鐨勬柟娉?/font></p> <p><font color="#0000ff" size="2">     3. 寮曠敤鍙橀噺鍙兘璋冪敤澹版槑璇ュ彉閲忕殑鎵鐢ㄧ殑綾誨寘鍚殑鏂規(guī)硶,閫氳繃寮曠敤鍙橀噺鍙兘璁塊棶鍒扮紪璇戞椂綾繪墍瀹氫箟鐨勫睘鎬?</font></p> <p><font color="#0000ff" size="2">     渚嬪 BaseClass bsc = new SubClass()閫氳繃鍙橀噺bsc鍙兘璋冪敤BaseClass鎵瀹氫箟鐨勬柟娉?鑰屼笉鑳借闂畇ub(),鎵浠sc.sub()浼?xì)缂栬瘧涓嶉氳繃.鍙互閫氳繃bsc璁塊棶test(),浣嗚繍琛屾椂璋冪敤鐨勬槸SubClass綾葷殑鏂規(guī)硶.閫氳繃bsc璁塊棶鐨勫睘鎬ook鏄疊aseClass鐨勫睘鎬?</font></p> <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; max-height: 200px"> <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff">class</span> BaseClass {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <span style="color: #0000ff">public</span> <span style="color: #0000ff">int</span> book = 1;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> <span style="color: #0000ff">base</span>() {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(<span style="color: #006080">"鐖剁被鐨勬櫘閫氭柟娉?</span>);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> test() {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(<span style="color: #006080">"鐖剁被琚鐩栫殑鏂規(guī)硶"</span>);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">}</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> SubClass extends BaseClass{</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <span style="color: #0000ff">public</span> String book = <span style="color: #006080">"JAVA"</span>;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> test() {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(<span style="color: #006080">"瀛愮被瑕嗙洊鐖剁被鐨勬柟娉?</span>);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> sub() {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(<span style="color: #006080">"瀛愮被鐨勬櫘閫氭柟娉?</span>);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> main(String[] args) {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(<span style="color: #006080">"=======BaseClass bc = new BaseClass();======="</span>);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> BaseClass bc = <span style="color: #0000ff">new</span> BaseClass();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(bc.book);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> bc.test();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> bc.<span style="color: #0000ff">base</span>();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(<span style="color: #006080">"=======SubClass sc = new SubClass();======="</span>);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> SubClass sc = <span style="color: #0000ff">new</span> SubClass();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(sc.book);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> sc.test();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> sc.<span style="color: #0000ff">base</span>();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(<span style="color: #006080">"=======BaseClass bsc = new SubClass();======="</span>);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> BaseClass bsc = <span style="color: #0000ff">new</span> SubClass();<span style="color: #008000">// 緙栬瘧鏃剁被鍨嬪拰榪愯鏃剁被鍨嬩笉涓鑷存椂,鍙戠敓澶氭?/span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(bsc.book);<span style="color: #008000">//鎵撳嵃:1,瀵硅薄鐨勫睘鎬т笉鍏鋒湁澶氭佹?鍙兘璁塊棶緙栬瘧鏃剁被鍨嬩腑鐨勫睘鎬?/span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> bsc.test();<span style="color: #008000">//瀛愮被瑕嗙洊鐖剁被鐨勬柟娉?榪愯鏃惰皟鐢ㄧ殑鏄繍琛屾椂綾誨瀷鎵瀹氫箟鐨勬柟娉?</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> bsc.<span style="color: #0000ff">base</span>();<span style="color: #008000">//鐖剁被鐨勬櫘閫氭柟娉?/span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <span style="color: #008000">//bsc.sub();// 鍙兘璁塊棶緙栬瘧鏃剁被鍨嬩腑鎵瀹氫箟鐨勬柟娉?/span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">}</pre></div></div><font color="#0000ff" size="2"></font><img src ="http://m.tkk7.com/wangjc0801/aggbug/251359.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/wangjc0801/" target="_blank">wangjc</a> 2009-01-14 23:01 <a href="http://m.tkk7.com/wangjc0801/archive/2009/01/14/251359.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鏁扮粍綾誨瀷http://m.tkk7.com/wangjc0801/archive/2009/01/12/251036.htmlwangjcwangjcMon, 12 Jan 2009 15:07:00 GMThttp://m.tkk7.com/wangjc0801/archive/2009/01/12/251036.htmlhttp://m.tkk7.com/wangjc0801/comments/251036.htmlhttp://m.tkk7.com/wangjc0801/archive/2009/01/12/251036.html#Feedback0http://m.tkk7.com/wangjc0801/comments/commentRss/251036.htmlhttp://m.tkk7.com/wangjc0801/services/trackbacks/251036.html

 

1. 瀹氫箟

    1. 鍚屼竴涓暟緇勪腑鍙兘瀛樺偍涓縐嶆暟鎹被鍨嬬殑鏁版嵁

    2. 瀛樺偍鐨勬暟鎹被鍨嬪彲浠ユ槸鍩烘湰鏁版嵁綾誨瀷,涔熷彲浠ユ槸寮曠敤鏁版嵁綾誨瀷

    3. 鏁扮粍涔熸槸涓縐嶇被鍨?鏄竴縐嶅紩鐢ㄦ暟鎹被鍨?鎵浠ユ暟緇勫湪瀹氫箟鐨勬椂鍊欏茍鏈垎閰嶅唴瀛?

2. 鍒濆鍖?/font>

    1. 闈欐佸垵濮嬪寲

        鐢辯▼搴忓憳鏄劇ず鎸囧畾姣忎釜鏁扮粍鍏冪礌鐨勫垵濮嬪?鐢辯郴緇熷喅瀹氶渶瑕佺殑鏁扮粍闀垮害

    2. 鍔ㄦ佸垵濮嬪寲

        鐢辯郴緇熺▼搴忓憳鎸囧畾鏁扮粍闀垮害,鐢辯郴緇熸寜鐓ф暟鎹被鍨嬫寚瀹氭暟緇勫厓绱犲垵濮嬪?

    鏁扮粍鐨勫垵濮嬪寲榪囩▼,灝辨槸涓烘暟緇勭殑鏁扮粍鍏冪礌鍒嗛厤鍐呭瓨絀洪棿鐨勮繃紼?闈欐佸垵濮嬪寲鍜屽姩鎬佸垵濮嬪寲涓嶈兘鍚屾椂榪涜,

涔熷氨鏄笉鑳藉嵆鎸囧畾鏁扮粍闀垮害,鍙堜負(fù)鏁扮粍鍏冪礌鎸囧畾鍒濆鍊?

    濡傛灉鏁扮粍鏄紩鐢ㄧ被鍨嬬殑,姣忎釜鏁扮粍鍏冪礌涓殑鏁版嵁灝辨槸寮曠敤鏁版嵁綾誨瀷,榪欐椂鐨勫紩鐢ㄦ暟鎹被鍨嬫槸淇濆瓨鍦ㄥ爢鍐呭瓨涓?/font>

鐨?鑰屾瘡涓紩鐢ㄦ暟鎹被鍨嬪張鎸囧悜鍙︿竴鍧楀爢鍐呭瓨絀洪棿,瀛樺偍鏈夋晥鐨勬暟鎹?

3. 鍐呭瓨涓殑鏁扮粍

int[] arrayA = new int[3];

    濡備笂,arrayA鍙槸涓涓紩鐢ㄥ彉閲?鍜屽垱寤虹被鏃朵竴鏍?寮曠敤鍙橀噺鏀懼湪鏍堝唴瀛樹腑.鍙湁鍦╪ew鏃?鎵嶄細(xì)鍦ㄥ爢鍐呭瓨涓負(fù)瀵硅薄鍒嗛厤鍐呭瓨絀洪棿.褰撳皢涓涓暟緇勫彉閲廰,璧嬬粰鏁扮粍鍙橀噺b鏃?鍗沖皢寮曠敤鍙橀噺b涔熸墽琛屽爢鍐呭瓨涓璦鍙橀噺鎸囧悜鐨勫璞″疄渚?榪欐牱涓や釜鍙橀噺a鍜宐閮芥寚鍚戜簡鍚屼竴涓暟緇勫璞?鑰岀浜屼釜鏁扮粍鍒欏彉鎴愪簡鍨冨溇,鐢辯郴緇熷瀮鍦懼洖鏀舵満鍒跺湪閫傚綋鐨勬椂鍊欏洖鏀惰繖涓璞℃墍鍗犵敤鐨勫唴瀛?

    浠g爜娓呭崟: 鏁扮粍鐨勫畾涔夊拰鍒濆鍖?/font>

 
public class ArrayTest {
    
    public static void main(String[] args) {
        
        int[] a = {1,2,3};//闈欐佸垵濮嬪寲
        int[] b = new int[4];//鍔ㄦ佸垵濮嬪寲
        
        System.out.println("鏁扮粍a鐨勯暱搴?"+a.length);
        for (int i=0;i<a.length;i++) {
            System.out.println("a["+i+"]="+a[i]);
        }
        
        System.out.println("鏁扮粍b鐨勯暱搴?"+b.length);
        for (int i=0;i<b.length;i++) {
            System.out.println("b["+i+"]="+b[i]);
        }
        
        b = a;
        System.out.println("鏁扮粍b鐨勯暱搴?"+b.length);
        
    }
 
    /*
    result:
    鏁扮粍a鐨勯暱搴?3
    a[0]=1
    a[1]=2
    a[2]=3
    鏁扮粍b鐨勯暱搴?4
    b[0]=0
    b[1]=0
    b[2]=0
    b[3]=0
    鏁扮粍b鐨勯暱搴?3
    */
}

 

4. 澶氱淮鏁扮粍

    java涓殑澶氱淮鏁扮粍瀹炶川涓婅繕鏄竴緇存暟緇?姣斿浜岀淮鏁扮粍,鏁扮粍鍏冪礌涔熸槸寮曠敤,鑰屾暟緇勫厓绱犱腑鐨勫紩鐢ㄦ寚鍚戜竴緇?/font>

鏁扮粍.

    浠g爜娓呭崟: 澶氱淮鏁扮粍

 
import java.util.Arrays;
 // Arrays綾諱腑鍖呭惈甯哥敤鐨勬柟娉?鍖呮嫭澶嶅埗鏁扮粍,鎺掑簭,鏌ユ壘,瀵規(guī)瘮,濉厖絳夊姛鑳?/pre>
public class ArrayTest2 {
 
    public static void main(String[] args) 
    {
        int[][] a = new int[3][2];//瀹氫箟涓涓簩緇存暟緇刟
        
        // 棣栧厛a鏄竴涓暱搴︿負(fù)3鐨勪竴緇存暟緇?/span>
        for (int i = 0; i < a.length ; i++ )
        {
            System.out.println(Arrays.toString(a[i]));//姣忎釜鏁扮粍鍏冪礌閮芥槸涓涓紩鐢ㄤ竴緇存暟緇勭殑寮曠敤鍙橀噺
        }
        
        a[0][0] = 1;
        a[0][1] = 2;
        //鍦ㄨ繖涓竴緇存暟緇勪腑鐨勫厓绱犲張鏄竴涓竴緇存暟緇?/span>
        System.out.println("浜岀淮鏁扮粍鐨勫厓绱犳槸涓緇存暟緇?");
        for (int j = 0; j < 2; j++) {
            System.out.println("a[0][" + j + "]=" + a[0][j]);
        }
        
        System.out.println("閲嶆柊璧嬪煎悗鐨勪簩緇存暟緇?");
        for (int i = 0; i < a.length ; i++ )
        {
            System.out.println(Arrays.toString(a[i]));
        }
 
        // 浜岀淮鏁扮粍鐨勯亶鍘?/span>
        System.out.println("浜岀淮鏁扮粍鐨勯亶鍘?");
        for (int i=0;i<3;i++) {
            for (int j=0;j<2;j++) {
                System.out.println("a["+i+"]["+j+"]="+a[i][j]);
            }
        }
    }
    /*
    [0, 0]
    [0, 0]
    [0, 0]
    浜岀淮鏁扮粍鐨勫厓绱犳槸涓緇存暟緇?
    a[0][0]=1
    a[0][1]=2
    閲嶆柊璧嬪煎悗鐨勪簩緇存暟緇?
    [1, 2]
    [0, 0]
    [0, 0]
    浜岀淮鏁扮粍鐨勯亶鍘?
    a[0][0]=1
    a[0][1]=2
    a[1][0]=0
    a[1][1]=0
    a[2][0]=0
    a[2][1]=0
    */
    
}


wangjc 2009-01-12 23:07 鍙戣〃璇勮
]]>
java嫻佺▼鎺у埗http://m.tkk7.com/wangjc0801/archive/2009/01/12/250910.htmlwangjcwangjcSun, 11 Jan 2009 16:17:00 GMThttp://m.tkk7.com/wangjc0801/archive/2009/01/12/250910.htmlhttp://m.tkk7.com/wangjc0801/comments/250910.htmlhttp://m.tkk7.com/wangjc0801/archive/2009/01/12/250910.html#Feedback0http://m.tkk7.com/wangjc0801/comments/commentRss/250910.htmlhttp://m.tkk7.com/wangjc0801/services/trackbacks/250910.html

 

1. 鏉′歡璇彞鍚庣殑璇彞,濡傛灉鍙湁涓鍙?鍙互鐪佺暐鑺辨嫭鍙?榪樺彲浠ユ槸涓涓┖璇彞,涔熷氨鏄彧鏈変竴涓垎鍙?/font>

2. switch璇彞涓瘡涓猚ase璇彞涓簲璇ュ凡break緇撳熬,鍚﹀垯浼?xì)鎵ц瀹屽悗闈㈢殑鎵鏈塩ase

3. break鍜宑ontinue璇彞鐢ㄦ潵鎺у埗寰幆緇撴瀯.break鐢ㄦ潵緇撴潫鏁翠釜寰幆浣?continue鐢ㄦ潵緇撴潫褰撳墠寰幆.鍦ㄥ祵濂楀驚鐜腑,浜岃呴兘鍙互閰嶅悎鏍囩鏉ョ粨鏉熸爣絳炬墍鏍囪瘑鐨勫驚鐜?

   紼嬪簭娓呭崟: 緇撴潫鏍囪瘑鐨勫驚鐜?/font>

 
public class BreakTest {
 
    public static void main(String[] args) {
        
        outFor://鏍囪澶栭儴鐨勫驚鐜?/span>
        for (int i=0;i<3;i++) {
            //鍐呴儴寰幆
            for (int j=0;j<3;j++) {
                
                System.out.println("i="+i+",j="+j);
                
                if (j==1) {
                    
                    break outFor; //璺沖嚭澶栭儴寰幆
                    /* result:
                    i=0,j=0
                    i=0,j=1
                    */
                    //continue outFor;
                    /* result:
                    i=0,j=0
                    i=0,j=1
                    i=1,j=0
                    i=1,j=1
                    i=2,j=0
                    i=2,j=1
                    */
                    
                }
            }
            
        }
 
    }
 
}


wangjc 2009-01-12 00:17 鍙戣〃璇勮
]]>
java榪愮畻絎?/title><link>http://m.tkk7.com/wangjc0801/archive/2009/01/11/250905.html</link><dc:creator>wangjc</dc:creator><author>wangjc</author><pubDate>Sun, 11 Jan 2009 15:41:00 GMT</pubDate><guid>http://m.tkk7.com/wangjc0801/archive/2009/01/11/250905.html</guid><wfw:comment>http://m.tkk7.com/wangjc0801/comments/250905.html</wfw:comment><comments>http://m.tkk7.com/wangjc0801/archive/2009/01/11/250905.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/wangjc0801/comments/commentRss/250905.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/wangjc0801/services/trackbacks/250905.html</trackback:ping><description><![CDATA[<div id="scgui4y" class="wlWriterEditableSmartContent" id="scid:51CF81A4-8F44-4a2c-8837-198C090B9994:bd3dcffa-ba9b-4cbc-b49f-10e6fca80101" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><p><a atomicselection="true"><img style="border-right: 2px; border-top: 2px; border-left: 2px; border-bottom: 2px" height="172" src="http://lh3.ggpht.com/_L3nkUmUbBp0/SWoFAjMOhHI/AAAAAAAAAGY/kzBvlgs-c7s/s400/java%E8%BF%90%E7%AE%97%E7%AC%A6.jpg" width="400"></a></p></div> <p><font color="#0000ff" size="2"></font> </p> <p><font color="#0000ff" size="2">1. 姣旇緝榪愮畻絎?鈥?=鈥?/font></p> <p><font color="#0000ff" size="2">    濡傛灉榪涜姣旇緝鐨勪袱涓搷浣滄暟鏄暟鍊煎瀷鐨?鍒欐槸姣旇緝涓や釜鎿嶄綔鏁扮殑鍊?鍙湁浜岃呯殑鍊肩浉絳?灝辮繑鍥瀟rue.</font></p> <p><font color="#0000ff" size="2">    濡傛灉榪涜姣旇緝鐨勬槸寮曠敤綾誨瀷,鍒欏綋浜岃呴兘鎵ц鐩稿悓鐨勫疄渚嬫椂,鎵嶈繑鍥瀟rue.</font></p> <p><font color="#0000ff" size="2">    紼嬪簭娓呭崟錛歋tring綾誨瀷鐨勬瘮杈?/font></p> <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; max-height: 200px"> <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> StringTest {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> main(String[] args) {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> String str1 = <span style="color: #0000ff">new</span> String(<span style="color: #006080">"123"</span>);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> String str2 = <span style="color: #0000ff">new</span> String(<span style="color: #006080">"123"</span>);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(str1 == str2);<span style="color: #008000">//榪欓噷榪斿洖false</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(str1.equals(str2));<span style="color: #008000">//true</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> String str3 = <span style="color: #006080">"123"</span>;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> String str4 = <span style="color: #006080">"123"</span>;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(str3 == str4);<span style="color: #008000">//榪欓噷榪斿洖true</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(str3.equals(str4));<span style="color: #008000">//true</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">}</pre></div></div> <p></p> <p><font color="#0000ff" size="2">銆銆濡備唬鐮佹墍紺猴紝涓や釜new寰楀埌鐨凷tring瀵硅薄铏界劧鍊肩浉絳?str1.equals(str2)榪斿洖true,浣嗙敱浜庝袱涓垎鍒槸涓?/font></p> <p><font color="#0000ff" size="2">鍚岀殑瀵硅薄瀹炰緥瀵硅薄,鍦ㄥ爢鍐呭瓨涓崰鏈変笉鍚岀殑鍐呭瓨絀洪棿,鎵浠tr1 == str2榪斿洖false.褰撴墽琛宻tr3 = "123"鏃?緋?/font></p> <p><font color="#0000ff" size="2">緇熶細(xì)鍏堜粠緙撳瓨涓鏌ユ槸鍚︽湁涓涓唴瀹逛負(fù)"123"鐨勫疄渚嬪瓨鍦?濡傛灉娌℃湁鍒欎細(xì)鍦ㄧ紦瀛樹腑鍒涘緩涓涓猄tring瀵硅薄"123",</font></p> <p><font color="#0000ff" size="2">鎵цstr4 = 鈥?23鈥濇椂,緙撳瓨涓凡緇忔湁浜嗙浉鍚屽唴瀹圭殑瀵硅薄,緋葷粺鍒欎笉鍐嶇敓鎴愬璞?鐩存帴灝唖tr4鎸囧悜閭d釜瀵硅薄.鎵</font></p> <p><font color="#0000ff" size="2">浠tr3 == str4浼?xì)杩斿洖true.</font></p> <p><font color="#0000ff" size="2">     鍚屾牱鐨勭郴緇熶細(xì)鎶婁竴浜涘垱寤烘垚鏈ぇ,闇瑕侀綣佷嬌鐢ㄧ殑瀵硅薄榪涜緙撳瓨,浠庤屾彁楂樼▼搴忕殑榪愯鎬ц兘.鍐嶆瘮濡?/font></p> <p><font color="#0000ff" size="2">Integer綾?</font></p> <p><font color="#0000ff" size="2">     紼嬪簭娓呭崟,Integer鐨勬瘮杈?/font></p> <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; max-height: 200px"> <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> IntegerTest {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> main(String[] args) {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> Integer ia = 1;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> Integer ib = 1;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(ia == ib); <span style="color: #008000">//true</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> Integer ic = 128;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> Integer id = 128;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(ic == id); <span style="color: #008000">//false</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">}</pre></div></div> <p><font color="#0000ff" size="2">銆銆緋葷粺浼?xì)灏唅nt鏁存暟鑷姩瑁呯鎴怚nteger瀹炰緥,鏂板緩瀹炰緥鏃?緋葷粺浼?xì)鍏堝垱寰忎竴涓暱搴︿負(fù)256鐨処nteger鏁扮粍,</font></p> <p><font color="#0000ff" size="2">鍏朵腑瀛樻斁-128鍒?27鐨処nteger瀹炰緥,褰撳啀闇瑕佷竴涓湪榪欎釜鑼冨洿涓殑Integer瀵硅薄鏃?緋葷粺浼?xì)鐩存帴灏嗗紩鐢ㄥ彉閲?/font></p> <p><font color="#0000ff" size="2">鎸囧悜鐩稿簲鐨勫疄渚嬪璞?ia鍜宨b閮芥寚鍚戠浉鍚岀殑Integer瀵硅薄鎵浠ヤ笂闈㈢殑ia == ib 榪斿洖true;鑰屽綋闇瑕佸垱寤虹殑</font></p> <p><font color="#0000ff" size="2">Integer瀵硅薄涓嶅湪榪欎釜鑼冨洿涓椂,緋葷粺鍒?/font><font color="#0000ff" size="2">浼?xì)鏂板垱寰忓璞?瀹為檯涓奿c鍜宨d鏄袱涓笉鍚岀殑瀵硅薄,鍒檌c == id 榪斿洖false.</font></p> <p><font color="#0000ff" size="2">2. 閫昏緫榪愮畻絎?/font></p> <div id="wywqgss" class="wlWriterEditableSmartContent" id="scid:51CF81A4-8F44-4a2c-8837-198C090B9994:19a68c7a-351e-4442-ae3e-8ce1f521be2b" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><p><a atomicselection="true"><img style="border-right: 2px; border-top: 2px; border-left: 2px; border-bottom: 2px" height="158" src="http://lh3.ggpht.com/_L3nkUmUbBp0/SWoRJuRm8-I/AAAAAAAAAG0/08pQT4oYrxg/s400/%E9%80%BB%E8%BE%91%E8%BF%90%E7%AE%97%E7%AC%A6.jpg" width="400"></a></p></div> <p><font color="#0000ff" size="2"></font> </p> <p></p> <p>銆<font color="#0000ff" size="2">紼嬪簭娓呭崟錛殀| 鍜?| 鐨勫尯鍒?/font></p> <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; max-height: 200px"> <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> LogicTest {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> main(String[] args) {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> <span style="color: #0000ff">int</span> a = 1;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <span style="color: #0000ff">int</span> b = 2;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <span style="color: #0000ff">if</span> (a == 1 || b++ == 3) {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(<span style="color: #006080">"a="</span>+a+<span style="color: #006080">",b="</span>+b);<span style="color: #008000">//a=1,b=2</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <span style="color: #0000ff">if</span> (a == 1 | b++ ==3) {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> System.<span style="color: #0000ff">out</span>.println(<span style="color: #006080">"a="</span>+a+<span style="color: #006080">",b="</span>+b);<span style="color: #008000">//a=1,b=3</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">}</pre></div></div> <p>銆銆<font color="#0000ff" size="2">"||" 褰撳墠闈㈢殑緇撴灉涓簍rue鏃?涓嶄細(xì)鍦ㄨ綆楀悗闈㈢殑緇撴灉,浼?xì)鐩存帴杩斿洖true;"|"鎬繪槸浼?xì)璁〗帡鍓嶅悗涓や釜琛ㄨ緫旨?</font></p><img src ="http://m.tkk7.com/wangjc0801/aggbug/250905.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/wangjc0801/" target="_blank">wangjc</a> 2009-01-11 23:41 <a href="http://m.tkk7.com/wangjc0801/archive/2009/01/11/250905.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鐞嗚В闈㈠悜瀵硅薄http://m.tkk7.com/wangjc0801/archive/2009/01/10/250761.htmlwangjcwangjcFri, 09 Jan 2009 16:17:00 GMThttp://m.tkk7.com/wangjc0801/archive/2009/01/10/250761.htmlhttp://m.tkk7.com/wangjc0801/comments/250761.htmlhttp://m.tkk7.com/wangjc0801/archive/2009/01/10/250761.html#Feedback0http://m.tkk7.com/wangjc0801/comments/commentRss/250761.htmlhttp://m.tkk7.com/wangjc0801/services/trackbacks/250761.html鐩墠杞歡寮鍙戠殑涓ょ寮鍙戞柟娉?緇撴瀯鍖栧紑鍙戞柟娉曞拰闈㈠悜瀵硅薄寮鍙戞柟娉?

  • 涓. 緇撴瀯鍖栧紑鍙戞柟娉?

1.涓誨紶鎸夌収鍔熻兘鏉ュ垎鏋愮郴緇熼渶姹?涔熺О涓洪潰鍚戝姛鑳界▼搴忚璁?/font>

2.緇撴瀯鍖栫▼搴忚璁¢鍏堥噰鐢ㄧ粨鏋勫寲鍒嗘瀽鏂規(guī)硶(Structrued Analysis SA)瀵圭郴緇熻繘琛岄渶姹傚垎鏋?鐒跺悗浣跨敤緇撴瀯鍖栬璁?Structrued Design SD)鏂規(guī)硶瀵圭郴緇熻繘琛屾瑕佽璁?璇︾粏璁捐,鏈鍚庨噰鐢ㄧ粨鏋勫寲緙栫▼(Structrued Program SP)鐨勬柟寮忔潵瀹炵幇緋葷粺

3.鏈灝忕▼搴忓崟鍏冩槸"鍑芥暟",姣忎釜鍑芥暟瀹屾垚涓涓姛鑳?

  • 浜? 闈㈠悜瀵硅薄寮鍙戞柟娉?

     1.浠庣幇瀹炰笘鐣屼腑鐨勫瑙傚瓨鍦ㄤ簨鐗╁嚭鍙戞潵鏋勯犺蔣浠剁郴緇?騫跺湪緋葷粺鏋勯犱腑灝藉彲鑳藉湴榪愮敤浜虹被鐨勮嚜鐒舵濈淮鏂瑰紡,寮鴻皟浠ョ幇瀹炰笘鐣屼腑鐨勫瑙傚瓨鍦ㄤ負(fù)涓績,鏉ユ濊冮棶棰?璁よ瘑闂,騫舵牴鎹簨鐗╃殑鏈川鐗圭偣,灝嗗畠浠娊璞′負(fù)緋葷粺涓殑綾?浣滀負(fù)緋葷粺鐨勫熀鏈瀯閫犲崟鍏?

     2.浣跨敤綾?瀵硅薄,緇ф壙,灝佽,娑堟伅絳夊熀鏈蹇墊潵榪涜紼嬪簭璁捐.

     3.鍖哄埆浜?鍩轟簬瀵硅薄".鍩轟簬瀵硅薄涔熶嬌鐢ㄤ簡瀵硅薄,浣嗘棤娉曞埄鐢ㄧ幇鏈夌殑瀵硅薄鍘諱駭鐢熸柊鐨勫璞?涔熷氨鏄涓嶈兘緇ф壙.姣斿javascript

     4.闈㈠悜瀵硅薄鐨勪笁涓熀鏈壒寰?   

         灝佽:

       灝嗗璞$殑瀹炵幇緇嗚妭闅愯棌璧鋒潵,鍦ㄩ氳繃鍏敤鐨勬柟娉曟潵鏆撮湶璇ュ璞$殑鍔熻兘.java鎻愪緵private,protected鍜宲ublic涓変釜璁塊棶鎺у埗淇グ絎﹀疄鐜拌壇濂界殑灝佽

         緇ф壙:

       鎻愪緵浜唀xtends鏉ヨ瀛愮被緇ф壙鐖剁被.緇ф壙鏄疄綰胯蔣浠跺鐢ㄧ殑閲嶈鎵嬫.

         澶氭?

       浣跨敤緇ф壙鍏崇郴鏉ュ疄鐜板鐢ㄦ椂,瀛愮被瀵硅薄鍙互鐩存帴璧嬬粰鐖剁被鍙橀噺.

    5.java涓殑綾諱富瑕佹湁涓ょ緇撴瀯鍏崇郴:

       a 涓鑸?鐗規(guī)畩:緇ф壙鍏崇郴,濡備漢-鐢蜂漢,鏄竴縐?is a"鐨勫叧緋?/font>

       b 鏁翠綋-閮ㄥ垎:緇勫悎鍏崇郴,濡備漢-鑳寵唺,鏄竴縐?has a"鐨勫叧緋?/font>



wangjc 2009-01-10 00:17 鍙戣〃璇勮
]]>
java鏍囪瘑絎?/title><link>http://m.tkk7.com/wangjc0801/archive/2009/01/09/250753.html</link><dc:creator>wangjc</dc:creator><author>wangjc</author><pubDate>Fri, 09 Jan 2009 15:07:00 GMT</pubDate><guid>http://m.tkk7.com/wangjc0801/archive/2009/01/09/250753.html</guid><wfw:comment>http://m.tkk7.com/wangjc0801/comments/250753.html</wfw:comment><comments>http://m.tkk7.com/wangjc0801/archive/2009/01/09/250753.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/wangjc0801/comments/commentRss/250753.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/wangjc0801/services/trackbacks/250753.html</trackback:ping><description><![CDATA[<ul> <li><font color="#0000ff" size="2">1. 鍙兘浠ュ瓧姣?涓嬪垝綰?_)鎴栫編鍏冪($)寮澶?鏁板瓧涓嶈兘浣滀負(fù)寮澶?/font> <li><font color="#0000ff" size="2">2. 涓嶈兘鍖呭惈緹庡厓絎?$)浠ュ鐨勭壒孌婄鍙?/font> <li><font color="#0000ff" size="2">3. 涓嶈兘鍖呭惈絀烘牸</font> <li><font color="#0000ff" size="2">4. 鍙互鏄腑鏂囧瓧絎︽垨鏃ユ枃瀛楃</font></li></ul><img src ="http://m.tkk7.com/wangjc0801/aggbug/250753.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/wangjc0801/" target="_blank">wangjc</a> 2009-01-09 23:07 <a href="http://m.tkk7.com/wangjc0801/archive/2009/01/09/250753.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>java鏁版嵁綾誨瀷http://m.tkk7.com/wangjc0801/archive/2009/01/09/250751.htmlwangjcwangjcFri, 09 Jan 2009 15:03:00 GMThttp://m.tkk7.com/wangjc0801/archive/2009/01/09/250751.htmlhttp://m.tkk7.com/wangjc0801/comments/250751.htmlhttp://m.tkk7.com/wangjc0801/archive/2009/01/09/250751.html#Feedback0http://m.tkk7.com/wangjc0801/comments/commentRss/250751.htmlhttp://m.tkk7.com/wangjc0801/services/trackbacks/250751.html1. 鏁村瀷

    鏁村瀷鏈変笁寮犺〃紺烘柟寮?

  • 10榪涘埗 :int i = 10;
  • 8榪涘埗   :int i = 013;
  • 16榪涘埗 :int i = 0xaF;

2. 瀛楃鍨?/font>

    瀛楃鍨嬫湁鍥涚琛ㄧず鏂瑰紡:

  • 鍗曚釜瀛楃     : char c = 鈥榓鈥?
  • 杞箟瀛楃     : char c = 鈥榎n鈥?
  • unicode緙栫爜: char c = 鈥榎u9999鈥?
  • int            : char c = 97;

3. 嫻偣鍨?/font>

     嫻偣鍨嬫湁涓ょ琛ㄧず鏂瑰紡:

  • 10榪涘埗鏁?nbsp;   : 5.123
  • 縐戝璁℃暟娉?nbsp; : 5.123E2

public class FloatTest {
 
 
    public static void main(String[] args) 
    {
        //嫻偣鍨嬫暟鎹繀欏誨寘鍚皬鏁扮偣,鍚﹀垯浼?xì)褰撲綔int澶勭悊
        //嫻偣鍨嬮粯璁ゆ槸double鍨嬬殑,榛樿鏄?4浣嶇殑,鎵浠ュ畾涔塮loat綾誨瀷鏄?蹇呴』鍦ㄦ渶鍚庡姞f琛ㄧずfloat鍨?/span>
        float f = 5.0f;
        float af = 5.123456789f;
        double df = 5.12345678987654321;
        //嫻偣鏁版槸浣跨敤浜岃繘鍒舵暟鎹殑縐戝璁℃暟娉曡〃紺?鎵浠ヤ笉鍙兘綺劇‘琛ㄧず涓涓誕鐐規(guī)暟.涓嬮潰灝嗙湅鍒扮殑鍊煎凡緇忓彂鐢熶簡鏀瑰彉
        System.out.println("af="+af);
        System.out.println("df="+df);
        //result:af=5.123457,df=5.123456789876543
        double a = 0.0;
        double c = Double.NEGATIVE_INFINITY;
        float d = Float.NEGATIVE_INFINITY;
        //鐪嬪埌float鍜宒ouble鐨勮礋鏃犵┓澶х殑鏄浉絳夌殑銆?/span>
        System.out.println(c == d);
        //0.0闄や互0.0灝嗗嚭鐜伴潪鏁?/span>
        System.out.println(a / a);
        //涓や釜闈炴暟涔嬮棿鏄笉鐩哥瓑鐨?/span>
        System.out.println(a / a == Float.NaN);
        //鎵鏈夋鏃犵┓澶ч兘鏄浉絳夌殑
        System.out.println(6.0 / 0 == 555.0/0);
        //璐熸暟闄や互0.0寰楀埌璐熸棤絀峰ぇ
        System.out.println(-8 / a);
        
        System.out.println(0.0 / 0.0);
        //result:NaN
 
        //涓嬮潰浠g爜灝嗘姏鍑洪櫎浠?鐨勫紓甯?/span>
        System.out.println(0 / 0);
        
    }
}

4. 甯冨皵鍨?/font>

    鍙兘鏄?true"鎴?false",涓嶈兘鍜屽叾浠栧熀鏈暟鎹被鍨嬬浉杞崲

5. 綾誨瀷杞崲

   a. 鑷姩綾誨瀷杞崲

鏁版嵁鑼冨洿灝忕殑鍙橀噺鎴栨暟鍊煎彲浠ョ洿鎺ヨ祴緇欐暟鎹寖鍥村ぇ鐨勫彉閲忔垨鏁板?緋葷粺鍙互鑷姩杞崲

   b. 寮哄埗綾誨瀷杞崲

        綾諱技灝嗕竴涓ぇ鐡跺瓙鐨勬按鍊掑叆涓涓皬鐡跺瓙涓?濡傛灉澶х摱瀛愪腑鐨勬按榪囧,灝嗗彲鑳藉鑷存孩鍑?

     浠g爜娓呭崟:寮哄埗綾誨瀷杞崲

 
public class Conversion {
 
    /**
     * @param args
     */
    public static void main(String[] args) {
        /*
         * int鏄?2浣嶇殑,渚嬪233:
         *     0000 0000 0000 0000 0000 0000 1110 1001
         * 灝唅nt璧嬬粰byte,byte鏄?浣嶇殑,鎵浠ヤ細(xì)灝嗗墠闈㈢殑24鎴彇鎺?鍙樻垚浜?/span>
         *                                1110 1001
         *  鏁存暟鍦ㄨ綆楁満涓槸浠ヨˉ鐮佺殑褰㈠紡淇濆瓨鐨?姝f暟鐨勮ˉ鐮佸拰鍘熺爜鐩稿悓,璐熸暟鐨勮ˉ鐮佹槸鍘熺爜鍙栧弽鍔?,鏈楂樹綅涓嶅彉.鎵浠?/span>
         *  11101001                               
         *     | 鍑?,鎴愬弽鐮?/span>
         *  11101000
         *     | 鍙栧弽鎴愬師鐮?/span>
         *  10010111 涔熷氨鏄?23
        */
        int intValue = 233;
        byte byteValue = (byte)intValue;
        System.out.println(byteValue);
        
        double doubleValue = 3.98;
        int intValue1 = (int)doubleValue;
        System.out.println(intValue1);
    }
 
}


wangjc 2009-01-09 23:03 鍙戣〃璇勮
]]>
java鏂規(guī)硶http://m.tkk7.com/wangjc0801/archive/2009/01/05/249983.htmlwangjcwangjcMon, 05 Jan 2009 12:50:00 GMThttp://m.tkk7.com/wangjc0801/archive/2009/01/05/249983.htmlhttp://m.tkk7.com/wangjc0801/comments/249983.htmlhttp://m.tkk7.com/wangjc0801/archive/2009/01/05/249983.html#Feedback0http://m.tkk7.com/wangjc0801/comments/commentRss/249983.htmlhttp://m.tkk7.com/wangjc0801/services/trackbacks/249983.htmljava鏂規(guī)硶

       1. java涓柟娉曚笉鑳藉崟鐙瓨鍦?鎵鏈夋柟娉曞繀欏誨畾涔夊湪綾諱腑.

       2. 浠庨昏緫涓婅,涓涓柟娉曡涔堝睘浜庝竴涓璞?瑕佷箞灞炰簬涓涓被(浣跨敤static淇敼鐨勬柟娉?

       3. 姘歌繙涓嶅彲鑳界嫭绔嬫墽琛屾柟娉?鎵ц鏂規(guī)硶蹇呴』浣跨敤綾繪垨瀵硅薄浣滀負(fù)璋冪敤鑰?鍖呮嫭闅愬紡鐨則his瀵硅薄

1. 甯哥敤鐨勪慨楗扮:

    static 鍙敤浜庝慨楗版柟娉?灞炴х瓑鎴愬憳.淇グ鎴愬憳琛ㄧず榪欎釜鎴愬憳鏄睘浜庤繖涓被鎵鍏辨湁鐨?鑰屼笉鏄睘浜庤繖涓被鐨勬煇涓涓疄渚?涓嶄嬌鐢╯tatic鐨勬垚鍛樺垯琛ㄧず,榪欎簺鎴愬憳鏄睘浜庤綾葷殑鏌愪竴涓疄渚?鑰屼笉鏄睘浜庤繖涓被.闈欐佹垚鍛樹笉鑳借闂潪闈欐佹垚鍛?

2. 鏂規(guī)硶鐨勫弬鏁頒紶閫掓満鍒?/font>

       java鏂規(guī)硶鐨勫弬鏁頒紶閫掓満鍒?鍊間紶閫?鎵璋撳間紶閫?灝辨槸灝嗗疄闄呭弬鏁扮殑鍓湰浼犲叆鏂規(guī)硶鍐?鑰屽弬鏁版湰韜笉鍙椾換浣曞獎(jiǎng)鍝?

       鍩烘湰鏁版嵁綾誨瀷鍜屽紩鐢ㄧ被鍨嬮兘鏄噰鐢ㄥ間紶閫掔殑鏂瑰紡榪涜.浣嗗鏋滀紶閫掔殑鏄紩鐢ㄧ被鍨?铏界劧浼犲叆鏂規(guī)硶鍐呯殑鏄紩鐢ㄧ被鍨嬪彉閲忕殑涓涓壇鏈?浣嗕袱涓紩鐢ㄧ被鍨嬪彉閲忛兘鏄寚鍚戜簡鍚屼竴涓爢鍐呭瓨涓殑瀵硅薄,閫氳繃浠諱綍涓涓紩鐢ㄥ彉閲忓瀵硅薄榪涜鎿嶄綔,閮戒細(xì)瀵硅繖涓璞′駭鐢熷獎(jiǎng)鍝?

public class Test { 

//鍩烘湰鏁版嵁綾誨瀷鐨勫間紶閫?/span>
private static void swap(int a ,int b) {
  int tmp = a;
  a = b;
  b = tmp;
  System.out.println("swap()鏂規(guī)硶涓?a="+a+",b="+b);
}
// 寮曠敤綾誨瀷鐨勫間紶閫?/span>
private static void swap2(Obj o) {
  int tmp = o.a;
  o.a = o.b;
  o.b = tmp;
  System.out.println("swap2()鏂規(guī)硶涓?a="+o.a+",b="+o.b);
}
public static void main(String[] args) {
  int a = 10;
  int b = 20;
  swap(a,b);
  System.out.println("swap()鏂規(guī)硶澶?a="+a+",b="+b);
  Obj o = new Obj();
  swap2(o);
  System.out.println("swap2()鏂規(guī)硶涓?a="+o.a+",b="+o.b);
}
} 

3. 褰㈠弬闀垮害鍙彉鐨勬柟娉?/font>

   闀垮害鍙彉鐨勫艦鍙傚彧鑳戒綅浜庡艦鍙傞槦鍒楃殑鏈鍚?涓涓柟娉曚腑鍙兘鍑虹幇涓涓暱搴﹀彲鍙樼殑褰㈠弬.榪欎釜闀垮害鍙彉鐨勫艦鍙傚彲浠ヤ紶鍏ュ涓弬鏁?涔熷彲浠ヤ紶鍏ヤ竴涓暟緇?/font>

public class Test3 { 

public String test(String... Strs) {
  String result = "";
  for (String tmp : Strs) {
   result += tmp;
  }
  return result;
}
public static void main(String[] args) {
  Test3 t = new Test3();
  System.out.println(t.test("Hello","!","world"));//鍙互浼犲叆澶氫釜String
  String[] tmp = {"Hello","!","world"};
  System.out.println(t.test(tmp));//涔熷彲浠ヤ紶鍏ヤ竴涓猄tring鏁扮粍
} 

} 

4. 鏂規(guī)硶閲嶈澆

   1. 鍑虹幇鍦ㄥ悓涓涓被涓?/font>

   2. 鏂規(guī)硶鍚嶇浉鍚?鏂規(guī)硶鐨勫艦鍙傚垪琛ㄤ笉鍚?/font>

   3. 鏂規(guī)硶鐨勫叾浠栧睘鎬у榪斿洖鍊肩被鍨?淇グ絎︾瓑涓庢柟娉曢噸杞芥棤鍏?/font>

5. 鏂規(guī)硶閲嶅啓

    1. 鍑虹幇鍦ㄧ戶鎵夸腑,瀛愮被鍜岀埗綾誨悓鍚嶇殑鏂規(guī)硶涔嬮棿

    2. 鏂規(guī)硶鍚?鏂規(guī)硶褰㈠弬鍒楄〃鐩稿悓;榪斿洖鍊肩被鍨?瀛愮被姣旂埗綾繪洿灝忔垨鐩哥瓑;鎶涘嚭鐨勫紓甯?瀛愮被姣旂埗綾繪洿灝忔垨鐩哥瓑;璁塊棶鏉冮檺,瀛愮被姣旂埗綾繪洿澶ф垨鐩哥瓑;浜岃呭繀欏誨悓鏃朵負(fù)瀹炰緥鏂規(guī)硶,鎴栧悓鏃朵負(fù)綾繪柟娉?/font>

    3. 縐佹湁鐨勭埗綾繪柟娉?鏄笉鑳借閲嶅啓鐨?/font>

6. 鏋勯犲櫒

   1. 姣忎釜java綾婚兘鑷沖皯鏈変竴涓瀯閫犲櫒,濡傛灉娌℃湁鏄懼紡鐨勬彁渚?緋葷粺浼?xì)鎻愪緵涓涓棤鍙傛暟鐨勬墽琛屼綋涓虹┖鐨勬瀯閫犲櫒

   2. 鏋勯犲櫒鍙互閲嶈澆,姣忎釜涓嶅悓鐨勬瀯閫犲櫒涔嬮棿鍙嬌鐢╰his鐩鎬簰璋冪敤,涓斿彧鑳藉湪絎竴琛岃皟鐢?/font>



wangjc 2009-01-05 20:50 鍙戣〃璇勮
]]>
Java姒傝堪http://m.tkk7.com/wangjc0801/archive/2009/01/04/249782.htmlwangjcwangjcSun, 04 Jan 2009 11:29:00 GMThttp://m.tkk7.com/wangjc0801/archive/2009/01/04/249782.htmlhttp://m.tkk7.com/wangjc0801/comments/249782.htmlhttp://m.tkk7.com/wangjc0801/archive/2009/01/04/249782.html#Feedback0http://m.tkk7.com/wangjc0801/comments/commentRss/249782.htmlhttp://m.tkk7.com/wangjc0801/services/trackbacks/249782.html1. java紼嬪簭鐨勮繍琛屾満鍒?/font>

    1. java璇█鏄紪璇戝瀷榪樻槸瑙i噴鍨?

    緙栬瘧鍨嬭璦鎸囦嬌鐢ㄧ壒瀹氱殑緙栬瘧鍣?閽堝鐗瑰畾鐨勫鉤鍙?鎿嶄綔緋葷粺)灝嗘簮浠g爜涓嬈℃х炕璇戞垚鍙璇ュ鉤鍙扮‖浠舵墽琛岀殑鏈哄櫒鐮?鍖呮嫭鏈哄櫒鎸囦護(hù)鍜屾搷浣滄暟),騫跺寘瑁呮垚璇ュ鉤鍙版墍鑳借瘑鍒殑鍙墽琛岀殑紼嬪簭.榪欎釜榪囩▼縐頒負(fù)緙栬瘧(Compile).緙栬瘧鐢熸垚鐨勫彲鎵ц鐨勭▼搴忓彲浠ヨ劚紱誨紑鍙戠幆澧?鍦ㄧ壒瀹氱殑騫沖彴涓婅繍琛?瑙i噴鍨嬭璦鎸囦嬌鐢ㄤ笓闂ㄧ殑瑙i噴鍣ㄥ婧愪唬鐮侀愯瑙i噴鎴愮壒瀹氬鉤鍙扮殑鏈哄櫒鐮?騫剁珛鍗蟲墽琛?瑙i噴鍨嬭璦鐩稿綋浜庡皢緙栬瘧鍨嬭璦涓殑緙栬瘧鍜岃В閲婂伐浣滄販鍚堝湪涓璧峰悓鏃惰繘琛?

    瑙i噴鍨嬭璦姣忔墽琛屼竴嬈℃簮浠g爜灝遍渶瑕侀噸鏂扮紪璇戜竴嬈?鍥犳鎵ц鏁堢巼姣旇緝浣?浣嗚В閲婂瀷璇█璺ㄥ鉤鍙扮‘姣旇緝瀹規(guī)槗,鍙渶瑕佹彁渚涚壒瀹氬鉤鍙扮殑瑙i噴鍣?璇ヨВ閲婂櫒灝變細(xì)璐熻矗灝嗘簮浠g爜瑙i噴鎴愮壒瀹氬鉤鍙頒笂鐨勬満鍣ㄦ寚浠?鑰岀紪璇戝瀷璇█鐨勮繍琛屾晥鐜囪緝楂?浣嗙Щ妞嶆瘮杈冮夯鐑?濡傛灉闇瑕佺Щ妞?鍒欓渶瑕佸皢婧愪唬鐮佸鍒跺埌鏂扮殑騫沖彴涓?閽堝璇ュ鉤鍙拌繘琛屼慨鏀瑰茍閲嶆柊緙栬瘧.

    java璇█鏃㈡槸緙栬瘧鍨嬭璦涔熸槸瑙i噴鍨嬭璦.

       java璇█鍦ㄧ紪璇戠殑鏃跺欎笉鏄敓鎴愮壒瀹氬鉤鍙扮浉鍏崇殑鏈哄櫒鐮?鑰屾槸鐢熸垚涓庡鉤鍙版棤鍏崇殑瀛楄妭鐮?鍙潰鍚慗VM(Java Virtual Machine).

       榪欑瀛楄妭鐮佸繀欏葷敱JVM瑙i噴鎵ц.

    2. 鍏充簬JVM

    JVM鍙互鐪嬪仛鏄竴涓娊璞$殑璁$畻鏈?鍜屽疄闄呯殑璁$畻鏈轟竴鏍?涔熷叿鏈夋寚浠ら泦鍜屽瓨鍌ㄥ尯鍩?瀹冭礋璐f墽琛屾寚浠?榪樿璐熻矗綆$悊鏁版嵁,鍐呭瓨鍜屽瘎瀛樺櫒.涓嶅悓騫沖彴涓婄殑JVM鏄笉鍚岀殑,浣嗘槸瀹冧滑閮芥彁渚涚浉鍚岀殑緙栫▼鎺ュ彛.鎵浠VM鏄痡ava璇█鍙互璺ㄥ鉤鍙扮殑鍏抽敭閮ㄥ垎,鍙涓嶅悓鐨勫鉤鍙板疄鐜頒笉鍚岀殑JVM,緙栬瘧鍚庣殑class鏂囦歡灝卞彲浠ュ湪璇ュ鉤鍙頒笂榪愯.

2. 鍏充簬Java鐨勯儴鍒嗘蹇?/font>

    1. JDK=Java SE Development Kit,java鏍囧噯鐗堝紑鍙戝寘,鍖呮嫭java緙栬瘧鍣?榪愯鏃剁幆澧?JRE)浠ュ強(qiáng)甯哥敤鐨刯ava綾誨簱絳?/font>

    2. JRE=Java Runtime Environment.java榪愯鏃剁幆澧?鍖呭惈JVM浠ュ,榪樻湁鍏朵粬綾葷殑鍔犺澆鍣?瀛楄妭鐮佹牎楠屽櫒浠ュ強(qiáng)澶ч噺鐨勫熀紜綾誨簱.

    3. Java EE SDK . 鍖呮嫭JDK.瀛︿範(fàn)java EE鐨勮蔣浠跺拰寮鍙戝寘(Software Development Kit)

3. java鐨勭幆澧冮厤緗?/font>

   1. 鍦╳indows涓嬬敤鎴峰彉閲忓拰緋葷粺鍙橀噺鐨勫尯鍒?

   緋葷粺鍙橀噺瀵規(guī)墍鏈夌敤鎴鋒湁鏁?鐢ㄦ埛鍙橀噺鍙褰撳墠鐢ㄦ埛鏈夋晥.瀵逛簬褰撳墠鐢ㄦ埛鑰岃█,涓よ呮病鏈夊尯鍒?鍙槸緋葷粺鍙橀噺涓殑閰嶇疆浼?xì)浼樺厛浜庣敤鎴峰彉閲忎腑鐨勯厤缃?

   2. classPath闇瑕侀厤緗悧?

   JDK1.4浠ュ墠鐨勭増鏈渶瑕佹墜鍔ㄧ殑璁劇疆classPath鍙橀噺,璁㎎RE鍘繪悳绱ava綾繪枃浠?闇瑕侀厤緗綋鍓嶈礬寰?.)鍙?JAVA_HOME%\lib\dt.jar鍜?JAVA_HOME%\lib\tools.jar.浣嗗湪JDK1.5涓彲浠ヤ笉閰嶇疆classPath鍙橀噺,JRE鍙互鑷姩鎼滅儲(chǔ)褰撳墠璺緞涓嬬殑綾繪枃浠跺拰鑷姩鍔犺澆dt.jar鍜宼ools.jar,鍚屾椂濡傛灉閰嶇疆浜哻lassPath鍙橀噺,鍒橨RE浼?xì)涓ユ牸鎸夌収鍙橀噺鐨勮矾寰勫幚L悳绱㈢被鏂囦歡.涔熷氨鏄濡傛灉瑕侀厤緗甤lassPath璺緞灝變竴瀹氳閰嶇疆鍑嗙‘,鍚﹀垯榪樻槸瑕佹姤閿欑殑.

   3. classPath鍙橀噺涓殑璺緞灝介噺涓嶈鍑虹幇絀烘牸,鍚﹀垯鍙互寮曞彂閿欒

4. java鐨勫瀮鍦懼洖鏀舵満鍒?Garbage Collection GC)

    1. java璇█涓嶉渶瑕佺▼搴忓憳鐩存帴鎺у埗鍐呭瓨鍥炴敹.鍨冨溇鍥炴敹鐨勫彂鐢熸湁涓嶅彲棰勭煡鎬?涓嶅緩璁嬌鐢╢inalize()鍜孲ystem.gc()鏉ュ緩璁郴緇熻繘琛屽瀮鍦懼洖鏀?鍥犱負(fù)榪欐牱鍋氫笉涓嶈兘綺懼噯鐨勬帶鍒跺瀮鍦懼洖鏀舵満鍒?鍙互閫氳繃鏆楃ず浣垮瀮鍦懼洖鏀舵満鍒跺彲浠ュ敖蹇殑鍥炴敹閭d簺涓嶅啀浣跨敤鐨勫璞?涔熷氨鏄皢璇ュ璞$殑寮曠敤鍙橀噺璁劇疆涓簄ull.

    2. java紼嬪簭鐨勫唴瀛樺垎閰嶅拰鍥炴敹閮芥槸鐢盝RE鍦ㄥ悗鍙拌繘琛岀淮鎶?閫氬父JRE浼?xì)鎻愪緵涓涓秴綰х嚎紼嬫潵榪涜媯(gè)嫻嬪拰鎺у埗,涓鑸槸鍦–PU絀洪棽鎴栧唴瀛樹笉瓚崇殑鎯呭喌涓嬭嚜鍔ㄨ繘琛岀殑,紼嬪簭鍛樻棤娉曠簿紜帶鍒跺瀮鍦懼洖鏀剁殑鏃墮棿鍜岄『搴?

    3. java榪愯鏃剁殑鏁版嵁瀛樻斁鍦ㄥ爢鍐呭瓨,鍨冨溇鍥炴敹鏈哄埗灝辨槸璐熻矗榪欓儴鍒嗗唴瀛樹腑鐨勮祫婧?瀹冨茍涓嶈兘鍥炴敹鍏朵粬濡傜鐩業(yè)O絳夌墿鐞嗚祫婧?

    4. 鍨冨溇鍥炴敹鏈哄埗鐨勭己鐐規(guī)槸瀹冪殑寮閿浼?xì)濯?jiǎng)鍝嶇▼搴忕殑鎬ц兘.JVM鎵鍋氱殑灝辨槸鐩戞帶紼嬪簭涓墍鏈夌殑瀵硅薄,紜鍝簺鏄棤鐢ㄧ殑瀵硅薄,騫舵渶緇堥噴鏀捐繖浜涙棤鐢ㄧ殑瀵硅薄.鑰屼笖java鐨勫瀮鍦懼洖鏀舵満鍒惰繕涓嶆槸寰堝畬澶?瀹冨茍涓嶈兘淇濊瘉鍙互100%鍦版敹闆嗘墍鏈夊簾寮冪殑鍐呭瓨.

    5. 鍨冨溇鍥炴敹鐨勭簿紜т富瑕佸寘鎷?涓柟闈?

       a. 鍨冨溇鍥炴敹鏈哄埗鍙互綺劇‘鍦版爣璁版椿鐫鐨勫璞?Java涓殑瀵硅薄鍏鋒湁鍞竴鎬?

       b. 鍨冨溇鍥炴敹鏈哄埗鍙互綺劇‘鍦板畾浣嶅璞′箣闂寸殑寮曠敤鍏崇郴.榪欐槸瀹炵幇褰掑茍鍜屽鍒剁瓑綆楁硶鐨勫繀瑕佹潯浠?閫氳繃榪欑寮曠敤鍏崇郴,鍙互淇濊瘉鎵鏈夌浉鍏崇殑瀵硅薄閮借兘琚彲闈犵殑鍥炴敹鍙?qiáng)閲嶆柊鍒嗛?浠庤屾湁鏁堝湴鍑忓皯鍐呭瓨紕庣墖鐨勪駭鐢?/font>

    6. 鐜板湪鐨凧VM鏈夊縐嶄笉鍚岀殑鍨冨溇鍥炴敹鏈哄埗,姣忕鏈哄埗浼?xì)鍥犲叾绠楁硶宸紓鑰岃〃鐜板悇寮?鏈夌殑褰撳瀮鍦懼洖鏀跺紑濮嬫椂灝卞仠姝㈠簲鐢ㄧ▼搴忕殑榪愯,鏈夌殑褰撳瀮鍦懼洖鏀惰繍琛屾椂,鍚屾椂鍏佽搴旂敤紼嬪簭榪愯,榪樻湁鐨勫悓涓鏃墮棿鍨冨溇鍥炴敹鏈夊涓嚎紼嬪湪榪愯.



wangjc 2009-01-04 19:29 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 亚洲αv久久久噜噜噜噜噜| 亚洲人AV永久一区二区三区久久| 拨牐拨牐x8免费| 亚洲国产精品自在线一区二区| 亚洲人成人网毛片在线播放| 欧洲精品99毛片免费高清观看| 色妞WWW精品免费视频| 亚洲精品自拍视频| 国产精品免费观看调教网| 亚洲熟妇无码AV在线播放| 人成电影网在线观看免费| 国产91久久久久久久免费| 亚洲精品无码久久久久牙蜜区| XXX2高清在线观看免费视频| 青青青国产色视频在线观看国产亚洲欧洲国产综合| 国产av无码专区亚洲av桃花庵 | 免费一级大黄特色大片| 亚洲精品无AMM毛片| 成人午夜大片免费7777| 亚洲校园春色另类激情| 在线观看成人免费视频不卡| 最新亚洲成av人免费看| 亚洲一区二区三区高清在线观看| 好久久免费视频高清| 日韩精品无码人妻免费视频| 久久亚洲国产成人亚| 精品一区二区三区免费| 亚洲va中文字幕无码久久不卡| 成全视频高清免费观看电视剧| 国产亚洲人成网站在线观看不卡| 99久久99这里只有免费的精品 | 4399好看日本在线电影免费| 亚洲成a人片在线观看中文app| 国产精品入口麻豆免费观看| 亚洲乱人伦精品图片| 成全动漫视频在线观看免费高清版下载 | 亚洲AV无码一区二区乱孑伦AS | 亚洲精品视频免费观看| 岛国片在线免费观看| 亚洲乱理伦片在线观看中字| 国产美女a做受大片免费|