You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:
have access to post topics
communicate privately with other members (PM)
not see advertisements between posts
have the possibility to earn one of our surprises if you are an active member
access many other special features that will be introduced later.
Date dday1=new Date(2007,6,31);
Date dday2=new Date(2005,1,1);
long sDay1=dday1.getTime();
long sDay2=dday2.getTime();
System.out.println(""+sDay1+"---"+sDay2);
it returns to me :1120147200000---1120147200000
why?
As for why here is the description of java.util.Date.getTime from the java docs
"Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object."