Java - Arrays
How would you modify this code to sum all elements in a 2D array?
int[][] matrix = {{1,2}, {3}};
int sum = 0;
// Your code hereint[][] matrix = {{1,2}, {3}};
int sum = 0;
// Your code here15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions