// Sample client of ArrayIntList public class ArrayIntListClient { public static void main(String[] args) { ArrayIntList list1 = new ArrayIntList(); ArrayIntList list2 = new ArrayIntList(); /* Hunter: A confusing edge case we talked about in lecture * ArrayIntList list3 = null; * list3.add(2); // NullPointerException, no list to add to * * ArrayIntList list4; * list4.add(2); // Compiler error, list4 not initialized to a value */ list1.add(1); list1.add(82); list1.add(97); list2.add(7); list2.add(-8); list1.addAll(list2); /* Hunter: Can no longer modify size when private * list1.size = 5; */ System.out.println(list1.size()); // Hunter: Both lines below are functionally the same System.out.println(list1); System.out.println(list2.toString()); } }