public class Test {
public static void main(String[] args) {
Calendar calendar = Calendar.getInstance();
Date date = new Date();
calendar.setTime(date);
calendar.add(Calendar.WEEK_OF_MONTH,1);//相当于在当前日期上加7天,例如现在是周一,加完后是下周一
calendar.set(Calendar.DAY_OF_WEEK, 7);//把当前日期所在的周设置到周六(7 就是一周的最后一天:周六)
System.out.println(calendar.getTime());
}
}