Wish that were true. In fact, only valueOf() and toString() are really different from java.util.Date; the time portion is preserved. java.sql.Time has similar behaviour. As the javadoc states, it is the responsibility of the JDBC driver to ensure that the time portion of the date is set to zero. But try for yourself:
Originally posted by Jim Yingst:
You can also achieve a simlar effect using java.sql.Date, which differs from a java.util.Date in exactly the way you want - the time component of the date is set to zero.