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 public class Main { public static double max(double... values) { if (values == null || values.length <= 0) { throw new IllegalArgumentException(); }/*from w w w . j a v a 2 s. c om*/ double max = values[0]; for (double value : values) { if (value > max) { max = value; } } return max; } }