public class OurArrayList { // This is the array in which we'll store the integers. Integer[] data = new Integer [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