code: public static double max(double[][] values) {
      double max = 0;
      for (int i = 0; i < values.length; i++) {
        for (int j = 0; j < values[i].length; j++) {
          max = (values[i][j] > max) ? values[i][j] : max;
        }
      }
      return max;
    }
docs: Finds and returns the maximum value in a 2-dimensional array of doubles.
  
  @param values the data to use.
  
  @return the largest value in the array.