Here you can find the source of max(List
public static double max(List<Double> data)
//package com.java2s; //License from project: Open Source License import java.util.Collections; import java.util.List; public class Main { public static double max(List<Double> data) { Collections.sort(data);/* w w w .j av a 2s . com*/ int n = data.size(); return data.get(n - 1); } }