If the index is always list.length() - 1 we can drop it, as the object passed into list.add() is always the last one inserted.