Collection Java Book

E set(int index, E element)
Replaces the element at the specified position in this Vector with the specified element.
void setElementAt(E obj, int index)
Sets the component at the specified index of this vector to be the specified object.