I think it\'s a fairly simple question, but I can\'t figure out how to do this properly.
I\'ve got an empty arraylist:
ArrayList list =
If that's the case then why don't you consider using a regular Array, initialize the capacity and put objects at the index you want.
Object[] list = new Object[10]; list[0] = object1; list[2] = object3; list[1] = object2;