A Java array has a fixed size and its elements sit next to each other, so adding or removing in the middle means shifting the rest. This topic shows how to shift safely without overwriting values and why it costs O(n). Use it for problems that ask you to insert at a position or remove a value in place. If your program inserts and deletes often, an ArrayList or a linked list is usually the better choice.