I have the following lines:
final SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
Date d = simpleDateFormat.parse("2004-52-05");
I expect the exception to be thrown on line 2 because "52" is not a valid month, but the code is executed, and the date stored in object d,
Sat Apr 05 00:00:00 EEST 2008
Can someone explain to me why?
source
share