锘??xml version="1.0" encoding="utf-8" standalone="yes"?>97国产精品久久,www国产亚洲精品,99视频这里有精品http://www.aygfsteel.com/marco/category/7334.html<b>緇х畫鎼炩€滃璞♀€濓紝鐜㎡O.</b> zh-cnFri, 02 Mar 2007 03:33:42 GMTFri, 02 Mar 2007 03:33:42 GMT60鎯婄幇 bruce eckel 鐨勪竴鍙ョ寷璇濓紒http://www.aygfsteel.com/marco/articles/67163.htmlmarcomarcoFri, 01 Sep 2006 09:16:00 GMThttp://www.aygfsteel.com/marco/articles/67163.htmlhttp://www.aygfsteel.com/marco/comments/67163.htmlhttp://www.aygfsteel.com/marco/articles/67163.html#Feedback0http://www.aygfsteel.com/marco/comments/commentRss/67163.htmlhttp://www.aygfsteel.com/marco/services/trackbacks/67163.htmlThe interfaces that are concerned with holding objects are Collection, List, Set, and Map.Ideally, you鈥檒l write most of your code to talk to these interfaces, and the only place where you鈥檒l specify the precise type you鈥檙e using is at the point of creation. So you can create a List like this:

List x = new LinkedList();


Of course, you can also decide to make x a LinkedList (instead of a generic List)and carry the precise type information around with x. The beauty (and the intent) of using the interface is that if you decide you want to change your implementation, all you need to do is change it at the point of creation, like this:

List x = new ArrayList();


The rest of your code can remain untouched (some of this genericity can also be achieved with iterators).

鎿嶃€備互鍓嶆€庝箞灝辨病浜鴻繖涔堣榪囧憿銆傚鐨勶紝閮芥槸鍨冨溇錛?/p>

marco 2006-09-01 17:16 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 大港区| 老河口市| 木兰县| 江北区| 东莞市| 阜宁县| 栖霞市| 日照市| 巢湖市| 南澳县| 永吉县| 京山县| 海晏县| 安国市| 太保市| 新闻| 合江县| 萨迦县| 泰和县| 洪洞县| 富源县| 夏邑县| 金寨县| 吴旗县| 芜湖县| 平罗县| 威信县| 西城区| 会东县| 孙吴县| 遂宁市| 阳曲县| 桐乡市| 牟定县| 千阳县| 玛多县| 沙雅县| 闻喜县| 于田县| 高雄市| 美姑县|