@Override
    /**
     * Change element in the list
     * x new element to put in
     * position place to replace
     */
    public void replace(E x, int position) {
        if (position >= 0 && position <= this.size - 1) // check if valid
            this.array[position] = x; // overwrite spot in array
    }