write a program to iterate the elements in array list
Anónimo
public static void main(String[] args) { // initializing ArrayList List numbers = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8); // Looping ArrayList using Iterator Iterator it = numbers.iterator(); while (it.hasNext()) System.out.print(it.next() + " "); } }