Java 中Date类getTime()的方法

Java 中Date类getTime()的方法

1.getTime()

    /**
     Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT   represented by this Date object.
     返回自从GMT 1970-01-01 00:00:00到此date对象上时间的毫秒数。
     
      @return  the number of milliseconds since January 1, 1970, 00:00:00 GMT   represented by this date.
     */
     
    public long getTime() {
        return getTimeImpl();
    }

2.注

返回的是毫秒数!

你可能感兴趣的:(#,Java)