public class OurArrayList2 { // This is the array in which we'll store the integers. int[] data = new int [1]; // Initially, there are none. int numItems = 0; public void add (Integer K) { if (numItems >= data.length) { // Need more space. Let's double it. int[] data2 = new int [2 * data.length]; // Copy over data into new space. for (int i=0; i