Java基础知识日积月累(Tip of the Day18)

目录

1.Collection的removeif方法的使用

2.collection集合的remove方法只能删除一个

3.collection集合removeif可以删除多个

4.removeif可以放的参数也就是实现类,判断条件后删除

5.迭代器遍历

6.迭代器小结

7.在集合删除时需要向前移动防止重复的删不掉,remove删除的是整个元素

8.增强for循环遍历,不能删除集合因为不能同时查看同时删除,并发异常

9.增强for循环总结

10.增强for循环修改的值是第三方变量


1.Collection的removeif方法的使用

Java基础知识日积月累(Tip of the Day18)

2.collection集合的remove方法只能删除一个

Java基础知识日积月累(Tip of the Day18)

3.collection集合removeif可以删除多个

Java基础知识日积月累(Tip of the Day18)

4.removeif可以放的参数也就是实现类,判断条件后删除

Java基础知识日积月累(Tip of the Day18)

5.迭代器遍历

Java基础知识日积月累(Tip of the Day18)

6.迭代器小结

Java基础知识日积月累(Tip of the Day18)

7.在集合删除时需要向前移动防止重复的删不掉,remove删除的是整个元素

Java基础知识日积月累(Tip of the Day18)

8.增强for循环遍历,不能删除集合因为不能同时查看同时删除,并发异常

Java基础知识日积月累(Tip of the Day18)

9.增强for循环总结

Java基础知识日积月累(Tip of the Day18)

10.增强for循环修改的值是第三方变量

Java基础知识日积月累(Tip of the Day18)