List 循环时执行删除操作

for(Iterator<OrderCostEntity> nit = ncostList.iterator();nit.hasNext();){

OrderCostEntity nse  = nit.next();

for(Iterator<OrderCostEntity> it = ocostList.iterator();it.hasNext();){

OrderCostEntity ose = it.next();

nit.remove();

}

}

你可能感兴趣的:(list)