Here you can find the source of findMax(List
static public double findMax(List<Double> values)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { static public double findMax(Double... values) { double max = Double.MIN_VALUE; for (double d : values) { if (d > max) max = d;// w w w. j a v a 2 s. co m } return max; } static public double findMax(List<Double> values) { double max = Double.MIN_VALUE; for (Double d : values) { if (d > max) max = d; } return max; } }