// 通过getInstance获取当前日期calendar实例
Calendar calendar = Calendar.getInstance();
// Month需要+1才是目标月
System.out.println(calendar.get(Calendar.YEAR) + "年"
+ (calendar.get(Calendar.MONTH) + 1) + "月"
+ calendar.get(Calendar.DAY_OF_MONTH) + "日");
// 加6天
calendar.add(Calendar.DATE, 6);
System.out.println(calendar.get(Calendar.YEAR) + "年"
+ (calendar.get(Calendar.MONTH) + 1) + "月"
+ calendar.get(Calendar.DAY_OF_MONTH) + "日");
Calendar calendar = Calendar.getInstance();
// Month需要+1才是目标月
System.out.println(calendar.get(Calendar.YEAR) + "年"
+ (calendar.get(Calendar.MONTH) + 1) + "月"
+ calendar.get(Calendar.DAY_OF_MONTH) + "日");
// 加6天
calendar.add(Calendar.DATE, 6);
System.out.println(calendar.get(Calendar.YEAR) + "年"
+ (calendar.get(Calendar.MONTH) + 1) + "月"
+ calendar.get(Calendar.DAY_OF_MONTH) + "日");