Question: 1 6 . Consider the following method. / * * Precondition: values has at least one row * / public static int calculate ( int
Consider the following method.
Precondition: values has at least one row
public static int calculateint values
int found values;
int result ;
for int row : values
for int y ; y row.length; y
if rowy found
found rowy;
result y;
return result;
Which of the following best describes what is returned by the calculate method?
A The largest value in the twodimensional array
B The smallest value in the twodimensional array
C The row index of an element with the largest value in the twodimensional array
D The row index of an element with the smallest value in the twodimensional array
E The column index of an element with the largest value in the twodimensional array
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
