add
Appends the specified element to the end of this list.
Parameters
element
Element to be appended to this list.
Inserts the specified element at the specified position in this list.
Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
Parameters
index
Index at which the specified element is to be inserted.
element
Element to be inserted.
Throws
If the index exceeds the list's bounds.