java program for loop with size of list code example
Example 1: java loop through list
for (E element : list) {
. . .
}
Example 2: java arraylist loop
for (int counter = 0; counter < arrlist.size(); counter++) {
System.out.println(arrlist.get(counter));
}