标签:java ar for sp c ad new r bs
public static void main(String[] args) {
List list=new ArrayList();
list.add(1);
list.add(2);
list.add(2);
list.add(4);
for(Object i:list){
System.out.println(i);
}
}
public static void main(String[] args) {
Set set=new HashSet();
set.add(2);
set.add(2);
set.add(3);
Iterator it=set.iterator();
while(it.hasNext()){
Object s=it.next();
System.out.println(s);
}
标签:java ar for sp c ad new r bs
原文地址:http://www.cnblogs.com/wjcom/p/3983158.html