今天写项目时,出现ConcurrentModificationException,记录一下解决过程
今天写项目时,出现ConcurrentModificationException,记录一下解决过程。代码如下:List<Student> list = new ArrayList<>(); list.add(new Student(1, -1, "瓢虫")); list.add(new Student(2, 1, "瓢虫")); list.add(new Student(3, 0, "瓢虫")