Here you can find the source of max(Date a, Date b)
public static Date max(Date a, Date b)
//package com.java2s; import java.util.*; public class Main { /**************************************************************************** * max/* w w w . j a v a 2 s .c o m*/ ****************************************************************************/ public static int max(int a, int b) { if (a > b) { return a; } return b; } public static Date max(Date a, Date b) { if (a.after(b)) { return a; } return b; } }