Deletes the component at the specified index. Each component in this vector with an index greater or equal to the specified {@code index} is shifted downward to have an index onesmaller than the value it had previously. The size of this vector is decreased by {@code 1}.
The index must be a value greater than or equal to {@code 0}and less than the current size of the vector.
This method is identical in functionality to the {@link #remove(int)}method (which is part of the {@link List} interface). Note that the{@code remove} method returns the old value that was stored at thespecified position.
@param index the index of the object to remove
@throws ArrayIndexOutOfBoundsException if the index is out of range( {@code index < 0 || index>= size()})