Here you can find the source of max(double[] list)
public static double max(double[] list)
//package com.java2s; //License from project: Apache License public class Main { public static double max(double[] list) { double m = Double.NEGATIVE_INFINITY; for (double x : list) m = Math.max(m, x);//from w w w . j a v a 2 s .com return m; } public static double max(double[][] mat) { double m = Double.NEGATIVE_INFINITY; for (double[] list : mat) for (double x : list) m = Math.max(m, x); return m; } public static int max(int[] list) { int m = Integer.MIN_VALUE; for (int x : list) m = Math.max(m, x); return m; } }