锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲AV无码第一区二区三区,亚洲精品制服丝袜四区,久久精品国产亚洲5555http://www.tkk7.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.tkk7.com/marco/articles/67163.htmlmarcomarcoFri, 01 Sep 2006 09:16:00 GMThttp://www.tkk7.com/marco/articles/67163.htmlhttp://www.tkk7.com/marco/comments/67163.htmlhttp://www.tkk7.com/marco/articles/67163.html#Feedback0http://www.tkk7.com/marco/comments/commentRss/67163.htmlhttp://www.tkk7.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).