Here you can find the source of max(double first, double second, double third, double fourth)
public static double max(double first, double second, double third, double fourth)
//package com.java2s; //License from project: Open Source License public class Main { public static double max(double first, double second, double third, double fourth) { if (first > second && first > third && first > fourth) { return first; }/*from w w w .j a v a 2 s . c o m*/ if (second > third && second > fourth) { return second; } if (third > fourth) { return third; } return fourth; } }