锘??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).