This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
when outputting a date string from a Calendar in SHORT format i get the string '25.10.01'. but if i read this string back in to set the calendar date it assumes the year to be 0001 and not 2001. how do i get the Calendar or DateForat class to assume that if year 01 is found assume its 2001 not 0001.
Hi Andrew, Whenever you use DateFormat you must use it on both ends. What does that mean? Well you have used it to output your string into SHORT form, so you must also use it when you read in back in from SHORT form. The following example shows what I am talking about.