Hey,
Date now = new Date();
if (now.getTime() - leasedDate.getTime() > 21 * 1000 * 60 * 60 * 24)
throw new TooLate();
leased.remove(x);
I'm looking at some code examples and above is a part of it. There's something I don't understand. Does the date object called "now" have the current date and hour in it? Because I thought it should be empty when it's initialised so I don't understand how now.getTime() can work.
Thanks!