Here you can find the source of max(double[] values)
public static double max(double[] values)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; public class Main { public static double max(double[] values) { Arrays.sort(values);// w ww. j a v a2s . c o m return maxOfSortedValues(values); } public static double maxOfSortedValues(double[] sortedValues) { return sortedValues[sortedValues.length - 1]; } }