Java--ArrayList的遍历

三种遍历方式

一、for循环

二、for each

三、Iterator器遍历

  Iterator it = list.iterator();
 while(it.hasNext()){

  syso(it.next());

 }

一般使用普通for循环,耗时较短

原文地址:https://www.cnblogs.com/code-fun/p/11184382.html