If the initial value is not set when the array is generated There is null in the array. 【code】
String[] c = new String[4];
c[1] += 3;
System.out.println(c[1]);
[Output result] null3
To set the initial values for all the elements of the array, add the following, Null did not enter.
Arrays.fill(c, "");
Recommended Posts