说什么呢?ArrayList arr3 = new ArrayList();
for(Iterator it=arr1.iterator();it.hasNext();){
Object o = it.netx();
if (!arr2.contains(o))
arr3.add(o);
}
for(Iterator it=arr1.iterator();it.hasNext();){
Object o = it.netx();
if (!arr2.contains(o))
arr3.add(o);
}
或者重写对象的equals方法。ArrayList arr3 = new ArrayList();
for(Iterator it=arr1.iterator();it.hasNext();){
Object o = it.next();
if (!arr2.contains(o))
arr3.add(o);
}