.add based on index in java code example Example: java insert at index myList.add(int index, E elemen);