81,094
社区成员
发帖
与我相关
我的任务
分享
String startDate = "201301";
String endDate = "201207";
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMM");
Calendar cal = Calendar.getInstance();
cal.setTime(sdf.parse(startDate));
cal.add(Calendar.MONTH, 1);//减一个月就是-1
System.out.println(sdf.format(cal.getTime()));