Here you can find the source of max(double[] array)
public static double max(double[] array)
//package com.java2s; public class Main { public static double max(double[] array) { double max = Double.NEGATIVE_INFINITY; for (int i = 0; i < array.length; i++) { if (array[i] > max) { max = array[i];/* w ww . j a v a 2 s . co m*/ } } return max; } public static float max(float[] array) { float max = Float.NEGATIVE_INFINITY; for (int i = 0; i < array.length; i++) { if (array[i] > max) { max = array[i]; } } return max; } }