Hi Lokesh,
Few things wrong in your code:
1. Change
pattern from dd-MM-YYYY to dd-MM-yyyy.
Y - Represents week year
y - represents year
2. To get value from a calendar, don't use like c.DATE. Instead
you should be using get function:
System.out.println(c.get(Calendar.DATE));
System.out.println(c.get(Calendar.MONTH));
System.out.println(c.get(Calendar.YEAR));
Check
here
Try with these changes and it should work.