问题代码
List<Object> list2 = list.subList(0, 3);
System.out.println("list集合 : " + list);
System.out.println("子集合的元素" + list2);
list.remove(0);
System.out.println("list集合 : " + list);
System.out.println("子集合的元素" + list2);
源码
private void checkForComodification() {
if (root.modCount != modCount)
throw new ConcurrentModificationException();
}