作业帮 > 综合 > 作业

c1.get(Calendar.MONTH)中月份少一个月

来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/08/20 01:18:55
c1.get(Calendar.MONTH)中月份少一个月
本来是8月的,但是它却现实7月,为什么
c1.get(Calendar.MONTH)中月份少一个月
请读API,实现就是如此,正常的.
另外 - 如果我的猜测是真的 - 显示日期最好用java.text.SimpleDateFormat.
String out = new SimpleDateFormat("yyyyMMdd").format(Calendar.getInstance().getTime())