锘??xml version="1.0" encoding="utf-8" standalone="yes"?>中文字幕亚洲精品在线观看,精品在线亚洲视频,久久综合九色综合97_久久久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 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 驻马店市| 抚顺市| 密云县| 醴陵市| 连江县| 大安市| 岑溪市| 江华| 福建省| 青浦区| 台山市| 南充市| 略阳县| 乡城县| 灵台县| 馆陶县| 锡林郭勒盟| 武功县| 平塘县| 广宁县| 新余市| 凌海市| 星座| 汕尾市| 济宁市| 珲春市| 谢通门县| 隆回县| 南皮县| 丹寨县| 偏关县| 丁青县| 安新县| 舞阳县| 康马县| 太谷县| 海安县| 长乐市| 清丰县| 吉安县| 乐安县|