Here you can find the source of max(double... ds)
public static double max(double... ds)
//package com.java2s; //License from project: LGPL public class Main { public static double max(double... ds) { double maxv = ds[0]; for (int i = 1; i < ds.length; i++) { maxv = Math.max(ds[i], maxv); }//from w w w. j a va 2s. co m return maxv; } }