for(int i =arraylist.count -1;i>=0;i--) { if(...) arraylist.remove(arraylist[i]); }
这样保证你操作只影响后方元素的索引,不会影响往前的遍历。