Here you can find the source of max(double n1, double n2, double n3)
public static double max(double n1, double n2, double n3)
//package com.java2s; //License from project: Apache License public class Main { public static double max(double n1, double n2, double n3) { return Math.max(n1, Math.max(n2, n3)); }//w w w . ja v a2 s. co m public static double max(double... values) { double max = -Double.MAX_VALUE; for (double value : values) max = Math.max(max, value); return max; } }