[Solved] Why does java.sql.Timestamp extend java.util.Date

Instead, use java.time As others stated: This class inheritance is poor design, a flawed hack. Now moot, as this class is now legacy, supplanted by java.time.Instant. Avoid all the old legacy date-time classes found outside the java.time package. For databases, use a driver compliant with JDBC 4.2 or later to directly exchange java.time objects with … Read more