Here you can find the source of max(double num1, double num2, double num3)
public static double max(double num1, double num2, double num3)
//package com.java2s; //License from project: Apache License public class Main { public static double max(double num1, double num2, double num3) { double max = num1; if (num2 > max) { max = num2;// w w w .j a v a2 s. c om } if (num3 > max) { return num3; } return max; } public static int max(int num1, int num2, int num3) { int max = num1; if (num2 > max) { max = num2; } if (num3 > max) { return num3; } return max; } }