How do I add an object to an array at the specified index?
Solution.
ArrayList<object> list = new ArrayList<object>();
list.add(0, object1);
list.add(1, object2);
list.add(2, object4);
list.add(2, object3);
The index of the new added object shouldn'texceed the array size more than on 1.