This constructor creates an empty list. theList = new ArrayList();
theList = new ArrayList();
Adds an element to the list. theList.add(new Integer(i));
theList.add(new Integer(i));
Checks if the specified int is already in the list. Integer[] ints = new Integer[theList.size()]; theList.toArray(ints); for (int j=0; j<ints.length; j++){ if (i == ints[j].intValue()) return true; } return false;
Integer[] ints = new Integer[theList.size()]; theList.toArray(ints); for (int j=0; j<ints.length; j++){ if (i == ints[j].intValue()) return true; } return false;