boolean add(Object c)boolean addAll(Collection c);
boolean remove(Object o);
boolean removeAll(Collection c);
boolean remainAll(Collection c);String[] o = (String[])c.toArray(new String[0]);for(int i=0; i<array.size(); i++) { ... get(i) ... }while((e=e.next())!=null) { ... e.data() ... }for(Iterator it = c.iterater(); it.hasNext(); ) { ... }public interface Iterator {
boolean hasNext();
Object next();
void remove();
}for(Iterator it = c.iterator(); it.hasNext(); ) {
Object o = it.next();
// 对o的操作...
}// Type是具体的类型,如String。
for(Type t : c) {
// 对t的操作...
}新闻热点
疑难解答