// Allison Obourn // CSE 143 - lecture 13 // Demonstrates usage of the IntList interface. import java.util.*; public class ListClient { public static void main(String[] args) { List myList = new ArrayList(); addAndPrint(myList); List list2 = new LinkedList(); addAndPrint(list2); for(String s : myList) { System.out.println(s); } } // Calls several methods on an ArrayIntList. // pre: list is not null public static void addAndPrint(List list) { list.add("34"); list.add("17"); list.add("23"); list.add(1, "6"); System.out.println(list); list.remove(0); for (int i = 0; i < list.size(); i++) { System.out.println(list.get(i)); } } }