現在日期=新日期();java中的新Date對象是否包含當前日期?或者它是空的?
if (now.getTime() - leasedDate.getTime() > 21 * 1000 * 60 * 60 * 24)
throw new TooLate();
leased.remove(x);
我在看一些代碼示例,以上是它的一部分。有些事我不明白。名爲「now」的日期對象是否有當前日期和小時?因爲我認爲它在初始化時應該是空的,所以我不明白now.getTime()是如何工作的。
謝謝!從Java文檔
你有*和* *的文檔資料.... – skaffman 2010-07-19 11:19:51