Here you can find the source of equals(Timestamp t1, Timestamp t2)
public static boolean equals(Timestamp t1, Timestamp t2)
//package com.java2s; import java.sql.Timestamp; public class Main { public static boolean equals(Timestamp t1, Timestamp t2) { if (t1 == null && t2 == null) { return true; } else {//from w w w.ja v a 2 s. c o m if (t1 == null) { return t2.equals(t1); } else { return t1.equals(t2); } } } }