View Single Post
  #1 (permalink)  
Old 07-10-2007, 04:54 AM
tola.ch2004 tola.ch2004 is offline
Member
 
Join Date: Jul 2007
Location: Fairfield, IA 52557
Posts: 2
tola.ch2004 is on a distinguished road
Send a message via Skype™ to tola.ch2004
Problem with "GregorianCalendar"
I initialize object of Gregorian class by the following code:
Code:
GregorianCalendar greCal = new GregorianCalendar(2000, 2, 1);
And display it by the following code:
Code:
System.out.println(greCal.getTime().getMonth() + "/" + greCal.getTime().getDate() + "/" + greCal.getTime().getYear());
Asa result I got:
2/1/100 (It is Wrong!)
It should be 2/1/2000

Anyone please tell me why?
Reply With Quote
Sponsored Links