Exception in thread "main" java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(Unknown Source) at java.util.AbstractList$Itr.next(Unknown Source)List<String> list = new ArrayList<String>();
list.add("1"); list.add("2"); list.add("3"); for(String t:list){ System.out.println(t); list.add("4"); }这个错是因为,我们在循环一个list的时候又对list进行操作,add,remove都不行