SimpleDateFormat parse does not work properly

java

Solution

It is `yyyy` not `YYYY` for the year field. That may be the problem! So try this:

String date = "04/11/1972";
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
System.out.println(sdf.format(sdf.parse(date)));

Problem

This is probably a very simple question but I dont see the problem or how to resolve it. Thank you for you help. ``` String date = "04/11/1972" SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/YYYY"); System.out.println(sdf.format(sdf.parse(date)); ``` and it displays : 03/01/1972 Why? How to get back my date. it seems there is a problem with the parse which does not give the proper Date object Thank you

Original source