0

While I am Running the below code today(28 Dec 2015), I am getting a value 28 Dec 2016

String date = new SimpleDateFormat("dd MMM YYYY").format(Calendar.getInstance().getTime());

To double check i ran the following code

Calendar now =Calendar.getInstance();
System.out.println(now.get(Calendar.YEAR));

It gives me year - 2015

What could be the reason?

Tunaki
  • 132,869
  • 46
  • 340
  • 423

0 Answers0