java集合遍历过程中报ConcurrentModificationException异常
问题代码
ArrayList arry = new ArrayList;
//添加数据代码略。。。。
for (String str : array) {
if (str == null) {//如果坐标不存在,则剔除该数据
array.remove(str);
}
}
原因可在 点击打开链接 查看。
修改方法为:
Iterator itera
原创
2017-09-07 13:03:38 ·
275 阅读 ·
0 评论