This type is a composite of a java.util.Date and a separate nanoseconds value. Only integral seconds are stored in the java.util.Date component. The fractional seconds - the nanos - are separate. The Timestamp.equals(Object) method never returns true when passed an object that isn't an instance of java.sql.Timestamp, because the nanos component of a date is unknown.
Kjeld Sigtermans wrote:When constructing a Timestamp using a milliseconds argument, there are no nanoseconds.
Kjeld Sigtermans wrote:The constructor of Timestamp(long millis) divides the given millis into a millis part and a nanos part. So the millis part always ends with 000 and the nanos part holds that lower significance multiplied by a million.