public void add(int index, int value)
{
checkIndex(index, 0, size);
checkResize();
for (int i = size; i > index; i--)
{
elementData[i] = elementData[i-1];
}
elementData[index] = value;
size++;
}