1List<String> list = new ArrayList><();
2
3list.add("one");
4list.add("two");
5list.add("three");
6
7Iterator<String> iterator = list.iterator();
8
9while(iterator.hasNext()) {
10 String element = iterator.next();
11 System.out.println( element );
12}