ConcurrentModificationException
异常,但它却成功运行了。为什么会这样?public void fun(){
List <Integer>lis = new ArrayList<Integer>();
lis.add(1);
lis.add(2);
for(Integer st:lis){
lis.remove(1);
System.out.println(lis.size());
}
}
public static void main(String[] args) {
test t = new test();
t.fun();
}