Question: Write a Java method that returns the location of the largest element in a two-dimensional array. public static int[] locateLargest(double[][] a) The return value is
Write a Java method that returns the location of the largest element in a two-dimensional array.
public static int[] locateLargest(double[][] a)
The return value is a one-dimensional array that contains two elements. These two elements indicate the row and column indices of the largest element in the two-dimensional array. Write a Java test Program that prompts the user to enter a two- dimensional array and displays the location of the largest element in the array.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
