fill an 2 d matrix with 0 in java code example Example: fill a two dimensional array with default value for (double[] row: matrix) Arrays.fill(row, 1.0);