public class List {
   Node head;

   public class Node {
      Object datum;
      Node link;

      public Node(Object item,Node pointer) {
         datum = item;
         link = pointer;
      }
   }

   public List() {
      head = null;

      head = new Node("Fred",head);
      head = new Node("Esther",head);
      head = new Node("Lamont",head);
   }

   public void traverse() {
      for (Node start = head;start != null;start = start.link)
         System.out.println(start.datum);
   }

   public static void main(String[] args) {
      List myList = new List();

      myList.traverse();
   }
   
}
