using for each on a list java code example
Example 1: java loop through list
for (E element : list) {
. . .
}
Example 2: iterate a list using iterator
Iterator<String> crunchifyIterator = crunchifyList.iterator();
while (crunchifyIterator.hasNext()) {
System.out.println(crunchifyIterator.next());
}