4 public static int maxSumRowIndex(int[][] arr){
5 int max = 0;
6 int n = 0;
7 for(int i = 0; i < arr.length; i++){
8 for(int j = 0; j < arr[0].length; j++){
9 if(arr[i][j] > max){
10 max = arr[i][j];
11 n = i;
12 }
13 }
14 }
15 return n;