String arrays cannot increase their size. If you wanted to add to it you would need to instantiate a completely new array and then copy the values from your initial array to the new string array.
Example:
In this example we are using a for-loop to loop through all of the indexes and assigning them to the new array, however when we get to the desired index we are assigning a new value thus "shifting" the other values in the new array.
String[] first = {"hello", "world", "how", "are", "you"};
String[] second = new String[5];
for(int i = 0; i < first.length; i++){
if(i != 2){
second[i] = first[i];
}else{
second[2] = "hi";
}
}
for(String s: second){
System.out.println(s);
}
Super ugly no?
I would recommend using an ArrayList or List instead. Arraylists have the ability to have their length increased without needing to do anything special to the initial array. You can simply say add(index, value).
Example:
ArrayList<String> values = new ArrayList<>();
values.add("hello");
values.add("world");
values.add("how");
values.add("are");
values.add("you");
values.add(2,"Hi"); //adding to index 2!
Now if for some reason you do need a regular old array, it is super easy to just convert your arraylist back to an array.
String[] newVal = new String[5];
values.toArray(newVal);