add
Inserts element at index, shifting following elements to the right.
An index equal to size appends to the list. Invalid positions are rejected by the implementation; ArrayList throws IllegalArgumentException.
Parameters
index
insertion position, from zero through size inclusive.
element
element to insert.