Originally posted by Shiv Then what is the purpose of ordering since ordering is done by index?
Actually the basic use (and often used) of the add(index,Object) is to provide something you call resetting the Object at given index.
When you simply use: add(Object); It is added sequentially in the list. But giving index, it goes to that position and sets the Object. I use "sets" because its soul purpose it that. From scratch adding object to the collection by giving it the index position as first argument is like you add to the array (clumsy way).
Collection made it convenient; taking care of indexes itself.