if we add element to 0 index in arraylist code example
Example 1: arraylist add at index
arrlist.add(2,25);
Example 2: append to arraylist by index java
arrlist.add(2,25);
// .add(index, content)
arrlist.add(2,25);
arrlist.add(2,25);
// .add(index, content)