1、返回一个实例,Calendar对象,是单一实例模式的一个应用,保证只有一个实例对象存在。
2、jdbc中的一个专用类,具体有什么好处不太清楚,扩展了几个java.sql.Date类的方法,很少用。
3、第一个getTime()返回一个Date对象,第二个返回一个int值,是从1970年1月1日0时到当前的总秒数。

解决方案 »

  1.   

    1:Gets a calendar using the default time zone and locale。返回值:Calendar类型
    2:A thin wrapper around java.util.Date that allows the JDBC API to identify this as an SQL TIMESTAMP value. It adds the ability to hold the SQL TIMESTAMP nanos value and provides formatting and parsing operations to support the JDBC escape syntax for timestamp values. public Timestamp(long time)
    Constructs a Timestamp object using a milliseconds time value. The integral seconds are stored in the underlying date value; the fractional seconds are stored in the nanos field of the Timestamp object.
    Parameters:
    time - milliseconds since January 1, 1970, 00:00:00 GMT. A negative number is the number of milliseconds before January 1, 1970, 00:00:00 GMT.
    3:gettime返回值是Date型,Date型对象的getTime方法返回Long