Programming



Programming Ex. 2: Locate the largest element

write the following 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 the largest element in the two dimensional array. Write a test program that prompts the user to enter a two-dimensional array and displays the location of the largest element in the array.