// using for each loop to print an Arraylist

import java.io.*;
import java.util.*;



public class ArrayListIterator
 {public static input in = new input();   // input library


  public static void main(String[] args) throws IOException  // always need main program
   {ArrayList a = new ArrayList();
    a.add("Joe");
    a.add("Tom");
    a.add("Pete");
     a.add("Fred");
	 a.add("Mike");
    a.add("Henry");

  

  System.out.println();
  System.out.println();

    for (String s : a)
      {System.out.println(s);
  }
}
}