Here you can find the source of max(double... nums)
public static double max(double... nums)
//package com.java2s; //License from project: Apache License public class Main { public static double max(double... nums) { if (nums.length == 0) { throw new IllegalArgumentException("Util.max() cannot be called with an empty array"); }/*www. ja v a 2 s. c o m*/ double max = Integer.MIN_VALUE; for (final double num : nums) { max = Math.max(max, num); } return max; } }