I am learning java and I did not see anything in the documentation about this. Is it possible to initialize only part of an array, with a bunch of different strings like so in one line:
String[] anArray = new String[20] {"water", "shovel", "berries", "stick", "stone", "seed", "axe"};
Only 7 spaces in the array are filled, and the rest can be initialized later? Is this possible? I find manually filling each space anArray[i] cumbersome. I also do not want to use an ArrayList, for reasons elsewhere in my code.
Help appreciated!