Here you can find the source of min(int a, int b)
public static int min(int a, int b)
//package com.java2s; //License from project: Apache License public class Main { public static int min(int a, int b) { if (a < b) return a; else/*from w ww .java 2 s.c o m*/ return b; } public static double min(double a, double b) { if (a < b) return a; else return b; } public static int min(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 min(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; } } }