I have this code snippet:
DateFormat formatter1;
formatter1 = new SimpleDateFormat("mm/DD/yyyy");
System.out.println((Date)formatter1.parse("08/16/2011"));
When I run this, I get this as the output:
Sun Jan 16 00:10:00 IST 2011
I expected:
Tue Aug 16 "Whatever Time" IST 2011
I mean to say I am not getting the month as expected. What is the mistake?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…