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