Skip to content

Instantly share code, notes, and snippets.

@mimibar
Last active March 14, 2021 05:17
Show Gist options
  • Save mimibar/e7acbb72246f5d7eb882 to your computer and use it in GitHub Desktop.
Save mimibar/e7acbb72246f5d7eb882 to your computer and use it in GitHub Desktop.
Arrays.fill with multidimensional array in Java
double[][] matrix = new double[20][4];
// Fill each row with 1.0
for (double[] row: matrix)
Arrays.fill(row, 1.0);
@mimibar
Copy link
Author

mimibar commented Dec 2, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment