Kjeld Sigtermans - SCJP 1.4 - SCWCD 1.4
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.
Joanne
Kjeld Sigtermans - SCJP 1.4 - SCWCD 1.4
Kjeld Sigtermans wrote:When constructing a Timestamp using a milliseconds argument, there are no nanoseconds.
Joanne
Kjeld Sigtermans - SCJP 1.4 - SCWCD 1.4
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.
Kjeld Sigtermans - SCJP 1.4 - SCWCD 1.4
Joanne
Kjeld Sigtermans - SCJP 1.4 - SCWCD 1.4