I have this code I would like to know why it returns correct date
Festival f= (Festival) festival.get(0);
Date d=f.getSDate();
System.out.println(d.getYear());
System.out.println(d.getMonth());
System.out.println(d.getDate());
SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy"); // define your format.
String formattedDate = df.format(d);
System.out.println("New Date To Show::"+formattedDate);
the output is this
2019
2
27
New Date To Show::27/03/3919