Java - ArrayList traversal

Three kinds of traversal

A, for circulation

二、for each

Three, Iterator traversal

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

  syso(it.next());

 }

Generally used for general circulation, time-consuming short

Guess you like

Origin www.cnblogs.com/code-fun/p/11184382.html