Wayne
          井底的蛙--一直仰望著天空
          posts - 16,comments - 6,trackbacks - 0
          08 2010 檔案
          Java clone()的進(jìn)一步探討(ZZ)      摘要: String在Clone中的玄機(jī)  閱讀全文
          posted @ 2010-08-28 17:47 waynewan 閱讀(848) | 評(píng)論 (0)  編輯
          Java中的String常量剖析(ZZ)      摘要: 常量池(constant pool)指的是在編譯期被確定,并被保存在已編譯的.class文件中的一些數(shù)據(jù)。它包括了關(guān)于類、方法、接口等中的常量,也包括字符串常量。  閱讀全文
          posted @ 2010-08-28 17:44 waynewan 閱讀(336) | 評(píng)論 (0)  編輯
          java中的clone      摘要: Suppose you have an object ‘a(chǎn)’ of class ‘A’. Sometimes you may need another new object ‘b’. It also belongs to class ‘A’ and has the same data with object ‘a(chǎn)’. But if you do some modification on b, it has no effect to the value of ‘a(chǎn)’. We call this process which produced new object ‘b’ as clone object ‘a(chǎn)’. The commonest time that you need to clone an object is when it is a parameter or return value of one of your public methods. If it is a parameter that you save somewhere, then you don't want t  閱讀全文
          posted @ 2010-08-28 17:36 waynewan 閱讀(285) | 評(píng)論 (0)  編輯
          Java中的Clone剖析(ZZ)      摘要: Java語言的一個(gè)優(yōu)點(diǎn)就是取消了指針的概念,但也導(dǎo)致了許多程序員在編程中常常忽略了對(duì)象與引用(此引用非C++中的引用)的區(qū)別,特別是先學(xué)c、c++后學(xué)java的程序員。并且由于Java不能通過簡單的賦值來解決對(duì)象復(fù)制的問題,在開發(fā)過程中,也常常要要應(yīng)用clone()方法來復(fù)制對(duì)象。比如函數(shù)參數(shù)類型是自定義的類時(shí),此時(shí)便是引用傳遞而不是值傳遞。  閱讀全文
          posted @ 2010-08-28 17:21 waynewan 閱讀(329) | 評(píng)論 (0)  編輯

          主站蜘蛛池模板: 建宁县| 商河县| 甘泉县| 时尚| 资中县| 明星| 凌源市| 固始县| 马龙县| 太原市| 玉环县| 宜宾县| 衡阳市| 来凤县| 延津县| 双城市| 容城县| 得荣县| 溧阳市| 本溪市| 富民县| 淮安市| 民丰县| 诸城市| 伊吾县| 平江县| 舒兰市| 遂平县| 辽源市| 金乡县| 青海省| 郁南县| 太仆寺旗| 房产| 铁岭市| 梨树县| 延寿县| 德清县| 洞头县| 阜新市| 汽车|