Open MoneZhao opened 5 years ago
https://monezhao.github.io/2019/08/02/ArrayList-loop-remove/
list的遍历分为3种: 普通遍历, for(int i=0;i<list.size();i++) 增强for循环, for(Object x:list) iterator遍历, Iterator<String> it = list.iterator(); while(it.hasNext()){} 同时ArrayList和线程安全的CopyOnWriteArrayList不
https://monezhao.github.io/2019/08/02/ArrayList-loop-remove/
list的遍历分为3种: 普通遍历, for(int i=0;i<list.size();i++) 增强for循环, for(Object x:list) iterator遍历, Iterator<String> it = list.iterator(); while(it.hasNext()){} 同时ArrayList和线程安全的CopyOnWriteArrayList不