Here you can find the source of max(T a, T b)
public static <T extends Comparable<T>> T max(T a, T b)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from www . j ava 2 s . co m*/ * Generalized version of Math.max */ public static <T extends Comparable<T>> T max(T a, T b) { if (a.compareTo(b) <= 0) return b; return a; } }