// client public class ArrayIntListClient { public static void main(String[] args) { // construct ArrayIntList list1 // construct ArrayIntList list2 ArrayIntList list1 = new ArrayIntList(); ArrayIntList list2 = new ArrayIntList(); // add 1, 82, 97 to list1 // add 7, -8 to list2 list1.add(1); list1.add(82); list1.add(97); list2.add(7); list2.add(-8); // before we made the fields private, // we could go in and mess with the data like this // (setting the size to 100 messes things up!) // list2.elementData[1] = -8; // list2.size = 100; // print list1 // print list2 System.out.println(list1); System.out.println(list2); } }