i have this code
public class HelloWorld{
public static void main(String []args){
try{
java.util.Date mDate;
java.text.SimpleDateFormat readFormat = new java.text.SimpleDateFormat("yyyy-mm-dd");
mDate = readFormat.parse("2017-02-05");
System.out.println("date: " + mDate.toString());
} catch (java.text.ParseException e1) {
e1.printStackTrace();
}
}
}
i expected output like Feb 05 00:02:00 UTC 2017
but im getting output Jan 05 00:02:00 UTC 2017 why? what's wrong in my code?