// Demonstrates some basic use of ArrayIntList import java.util.*; public class ArrayIntListClient2 { public static void main(String[] args) { // test appending add and toString ArrayIntList list = new ArrayIntList(); list.add(3); list.add(6); list.add(9); list.add(12); list.add(15); System.out.println("initial list = " + list); System.out.println(); // test indexOf for (int i = 1; i <= 15; i++) { System.out.println("indexOf(" + i + ") = " + list.indexOf(i)); } System.out.println(); // test some remove calls list.remove(0); list.remove(2); System.out.println("after some removes, list = " + list); System.out.println(); // test some calls on add-at-an-index list.add(0, 0); list.add(1, 3); list.add(4, 12); list.add(6, 18); System.out.println("after some adds, list = " + list); System.out.println(); } }