I was trying an exercise where I would add 1000 elements to an arraylist and then remove them systematically from the list again(by specifying the index). The idea behind th
Because while you are removing elements from the ArrayList its index is being updated. So you remove an element at position 0 and the element in position 1 is in the index 0 position now. So when you delete element at index 1 you are rally removing element at index 2 of the original ArrayList, and so on.