我已经编写了打印当前日期的代码。
但它的输出为:
实际输出应该为:
系统日期也是正确的。
代码有什么问题?
Date date = new Date();
DateFormat dateFormat = new SimpleDateFormat("ddMMYYYY");
String newdate = dateFormat.format(date);
但它的输出为:
29122016
实际输出应该为:
29122015
系统日期也是正确的。
代码有什么问题?