Here you can find the source of max(double... arr)
public static double max(double... arr)
//package com.java2s; /**// w w w . j ava2 s.c o m * Copyright (c) Lambda Innovation, 2013-2015 * ?????????Lambda Innovation??? * http://www.li-dev.cn/ * * This project is open-source, and it is distributed under * the terms of GNU General Public License. You can modify * and distribute freely as long as you follow the license. * ?????????????????GNU????????????? * ???????????????????????????? * http://www.gnu.org/licenses/gpl.html */ public class Main { public static int max(int... arr) { int max = Integer.MIN_VALUE; for (int i : arr) if (i > max) max = i; return max; } public static double max(double... arr) { double max = Double.MIN_VALUE; for (double d : arr) if (d > max) max = d; return max; } }