Here you can find the source of max(int a, int b)
public static int max(int a, int b)
//package com.java2s; //License from project: Apache License public class Main { public static int max(int a, int b) { if (a > b) return a; else//from ww w. j av a 2s . c o m return b; } public static double max(double a, double b) { if (a > b) return a; else return b; } public static int max(int a, int b, int c) { if (a > b) { if (a > c) return a; else return c; } else { if (b > c) return b; else return c; } } public static double max(double a, double b, double c) { if (a > b) { if (a > c) return a; else return c; } else { if (b > c) return b; else return c; } } }