java.sql.DateThe java.sql.Date class represents only date in java. It inherits java.util.Date class. The java.sql.Date instance is widely used in JDBC because it represents the date that can be stored in database. Some constructors and methods of java.sql.Date class has been deprecated. Here, we are not giving list of any deprecated constructor and method. java.sql.Date Constructor
java.sql.Date Methods
java.sql.Date Example: get current dateLet's see the example to print date in java using java.sql.Date class. Output: 2015-03-30 Java String to java.sql.Date ExampleLet's see the example to convert string into java.sql.Date using valueOf() method. Output: 2015-03-31 Next TopicJava Calendar
|