Question: With Java write a method which takes a 2D array of ints. It should find which row has the largest sum. That is, calculate the
With Java write a method which takes a 2D array of ints. It should find which row has the largest sum. That is, calculate the sum of each row, then compare it to that of the last row. The return value is an integer the index of the row with the largest sum. Example: given {{4,2,1},{1,1,1},{5,5,5}}, the return value should be 2 as the last row has the largest sum.
public __________ findLargestRowSum ( _________________________________){
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
