Java Arrays.fill()
Here's a suggestion using a for-each:
for (int[] row : array) Arrays.fill(row, 0);
You can verify that it works by doing
System.out.println(Arrays.deepToString(array));
A side note: Since you're creating the array, right before the fill, the fill is actually not needed (as long as you really want zeros in it). Java initializes all array-elements to their corresponding default values, and for int
it is 0 :-)