@Override
    /**
     * Find index of x
     * Return -1 if not present, position number if present
     */
    public int index(E x) {
        for (int pos = 0; pos < this.size; pos++) // loop through array
            if (x.equals(this.array[pos])) // if we find it, return the position
                return pos;
        return -1; // -1 if we get through the loop without finding it
    }