public void add(int index, Object element) code example
Example: public void add(int index e element)
ArrayList<String> stringArray = new ArrayList<String>();
stringArray.add("First Element");
stringArray.add("Third Element");
stringArray.add(1, "Second Element");
System.out.println(stringArray);
// ["First Element", "Second Element", "Third Element"]