锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲色偷偷偷鲁综合,亚洲AV伊人久久青青草原,亚洲老熟女五十路老熟女bbwhttp://m.tkk7.com/swingboat/category/6381.html&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;----鍙璺夊浜嗭紝灝變笉鎬曟湁澶氳繙錛?/description>zh-cnTue, 08 May 2007 14:10:41 GMTTue, 08 May 2007 14:10:41 GMT60synchronized鐨勪綔鐢?/title><link>http://m.tkk7.com/swingboat/archive/2007/05/08/115882.html</link><dc:creator>swingboat</dc:creator><author>swingboat</author><pubDate>Tue, 08 May 2007 03:02:00 GMT</pubDate><guid>http://m.tkk7.com/swingboat/archive/2007/05/08/115882.html</guid><wfw:comment>http://m.tkk7.com/swingboat/comments/115882.html</wfw:comment><comments>http://m.tkk7.com/swingboat/archive/2007/05/08/115882.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/swingboat/comments/commentRss/115882.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/swingboat/services/trackbacks/115882.html</trackback:ping><description><![CDATA[     鎽樿: synchronized鐨勪綔鐢?nbsp;涓銆佸悓姝ユ柟娉昿ublic synchronized void methodAAA(){ //…. }閿佸畾鐨勬槸璋冪敤榪欎釜鍚屾鏂規硶鐨勫璞?嫻嬭瘯錛歛銆佷笉浣跨敤榪欎釜鍏抽敭瀛椾慨楗版柟娉曪紝涓や釜綰跨▼璋冪敤鍚屼竴涓璞$殑榪欎釜鏂規硶銆傜洰鏍囩被錛?1public class TestThread {2   &nb...  <a href='http://m.tkk7.com/swingboat/archive/2007/05/08/115882.html'>闃呰鍏ㄦ枃</a><img src ="http://m.tkk7.com/swingboat/aggbug/115882.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/swingboat/" target="_blank">swingboat</a> 2007-05-08 11:02 <a href="http://m.tkk7.com/swingboat/archive/2007/05/08/115882.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>璁捐妯″紡錛嶏紞>Singleton錛堝崟渚嬫ā寮忥級 http://m.tkk7.com/swingboat/archive/2005/12/28/25665.htmlswingboatswingboatWed, 28 Dec 2005 01:21:00 GMThttp://m.tkk7.com/swingboat/archive/2005/12/28/25665.htmlhttp://m.tkk7.com/swingboat/comments/25665.htmlhttp://m.tkk7.com/swingboat/archive/2005/12/28/25665.html#Feedback0http://m.tkk7.com/swingboat/comments/commentRss/25665.htmlhttp://m.tkk7.com/swingboat/services/trackbacks/25665.html鍗曚緥妯″紡錛屼篃灝辨槸鍦ㄧ郴緇熶腑鍙瓨鍦ㄤ竴涓簨渚嬨傚畠鐨勫簲鐢ㄨ繕鏄瘮杈冨箍娉涚殑錛屼緥濡備駭鍝佺殑鍔熻兘鑿滃崟錛堝姛鑳芥爲錛夛紝緋葷粺涓婄嚎浠ュ悗錛屽畠灝卞緢灝戣繘琛屼慨鏀逛簡錛屼負浜嗘彁渚涚郴緇熺殑鎬ц兘錛屽彲浠ュ湪緋葷粺涓彧瀛樺湪榪欐牱涓涓姛鑳借彍鍗曚簨渚嬨傝繖鏍峰崟渚嬫ā寮忎篃寰寰鍜孋aching(緙撳瓨)妯″紡鍚屾椂浣跨敤銆?
package yhp.test.pattern.singleton;

public class TestSingleton {
   
    private static TestSingleton _instance;
    public static TestSingleton getInstance(){
        if(_instance==null)
            _instance=new TestSingleton();
        return _instance;
    }
    private TestSingleton(){}  //淇濊瘉浜嗕笉鑳界洿鎺ew
    
    private int _x=0;

    public int get_x() {
        return _x;
    }
    public void set_x(int _x) {
        this._x = _x;
    }
   
    public static void main(String[] args) {
        TestSingleton first=TestSingleton.getInstance();
        TestSingleton second=TestSingleton.getInstance();
        first.set_x(4);
        System.out.println("First instance X's Value is:"+first.get_x());                   //杈撳叆錛?
        System.out.println("Sesond instance X's Value is:"+second.get_x());         //杈撳叆錛?    
    }
}

鏈夌偣濂囨殑鏄細鎴戝湪main鍑芥暟涓鍔犱互涓嬩唬鐮侊細
try{
        TestSingleton test= new TestSingleton(); 
        test.set_x(6);
        System.out.println("new instance X's Value is:"+test.get_x());
}catch(Exception e){
        System.out.println("鍗曚緥妯″紡瀵硅薄鏄笉鍏佽琚玭ew鐨勶紒");
}
鍦╡clipse涓繍琛岋紝绔熺劧鑳藉緙栬瘧閫氳繃錛岃屼笖杈撳嚭浜?錛屼絾鏂板緩涓涓被錛屽湪main鍑芥暟涓鍔犵浉鍚岀殑浠g爜錛岀紪璇戝氨涓嶈兘閫氳繃浜嗐?/P>

swingboat 2005-12-28 09:21 鍙戣〃璇勮
]]>
cache妯″紡鐨勪袱縐嶆瀯鎴愭柟寮?http://m.tkk7.com/swingboat/archive/2005/12/28/25645.htmlswingboatswingboatWed, 28 Dec 2005 01:01:00 GMThttp://m.tkk7.com/swingboat/archive/2005/12/28/25645.htmlhttp://m.tkk7.com/swingboat/comments/25645.htmlhttp://m.tkk7.com/swingboat/archive/2005/12/28/25645.html#Feedback0http://m.tkk7.com/swingboat/comments/commentRss/25645.htmlhttp://m.tkk7.com/swingboat/services/trackbacks/25645.html1銆佺郴緇熺涓嬈¤闂紝浠庢暟鎹腑鑾峰彇鎵鏈夌殑鏁版嵁鏀懼叆鍒癏ashtable銆?BR>      榪欑鏂瑰紡姣旇緝閫傚悎鏁版嵁閲忔瘮杈冨皬鐨勬暟鎹紝渚嬪錛氭ā鍧楃殑綆$悊銆備竴涓郴緇熶腑涓嶅彲鑳芥湁澶鐨勬ā鍧楋紝涓嬈′粠鏁版嵁搴撲腑鑾峰彇鍑烘墍鏈夌殑妯″潡鏁版嵁錛屾斁鍏ュ埌Hashtable涓備互鍚庡妯″潡鐨勮闂兘鍙敤瀵笻ashtable璁塊棶灝卞彲浠ヤ簡銆?BR> 2銆佺郴緇熺涓嬈¤闂紝鍙幏鍙栭渶瑕佽闂殑鏁版嵁錛岀劧鍚庢妸瀹冧滑鏀懼叆鍒癏ashtable涓?BR>       榪欑鏂瑰紡姣旇緝閫傚悎鏁版嵁閲忚繕鏄瘮杈冨ぇ鐨勬暟鎹傞渶瑕佽闂暟鎹椂錛岄鍏堟嫻婬ashtable涓湁娌℃湁闇瑕佺殑鏁版嵁錛屽鏋滄湁灝辯洿鎺ヤ粠Hashtable涓幏鍙栵紝濡傛灉娌℃湁灝變粠鏁版嵁搴撲腑鑾峰彇闇瑕佺殑鏁版嵁錛岀劧鍚庡啀鎶婅繖浜涙暟鎹斁鍏ュ埌Hashtable涓?

娉ㄦ剰錛氫袱縐嶆柟寮忥紝褰撴暟鎹鏀瑰姩鐨勬椂鍊欙紙add,update,del錛夊悓鏃朵篃闇瑕佹洿鏂癏ashtable涓殑鏁版嵁銆?img src ="http://m.tkk7.com/swingboat/aggbug/25645.html" width = "1" height = "1" />

swingboat 2005-12-28 09:01 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 亚洲伦另类中文字幕| 浮力影院亚洲国产第一页| 亚洲国产精品成人久久久| 免费无码一区二区三区| 亚洲av无码乱码国产精品fc2| 三级毛片在线免费观看| 久久精品国产亚洲综合色| a色毛片免费视频| 亚洲国产精品自在在线观看| 91精品免费不卡在线观看| 亚洲美女激情视频| 亚洲码国产精品高潮在线| 精品无码一级毛片免费视频观看 | 亚洲综合无码精品一区二区三区| 黄色视频在线免费观看| 亚洲精品二区国产综合野狼| 久久精品国产这里是免费| 亚洲精品亚洲人成在线麻豆| 最近中文字幕mv手机免费高清| 久久亚洲中文字幕无码| 国产在线jyzzjyzz免费麻豆| 日韩亚洲国产综合高清| 四虎影视在线永久免费看黄| 久久久WWW免费人成精品| 亚洲最新永久在线观看| 成人免费在线观看网站| 一级人做人a爰免费视频| 亚洲AV无码精品色午夜果冻不卡| 18女人水真多免费高清毛片| 亚洲精品成a人在线观看夫| 亚洲人成网站观看在线播放| 国产成人精品一区二区三区免费| 亚洲免费福利在线视频| 亚洲电影日韩精品| 最新黄色免费网站| 免费国产污网站在线观看不要卡| 亚洲国产二区三区久久| 日本免费网站观看| 亚欧免费一级毛片| 香蕉97碰碰视频免费| 日本一道一区二区免费看|