I know there is the same question here, but I have tried the answer provided and it returned an output that I don\'t understand. I am confused by the answer and I don\'t thi
Or Just do some simple math. Since Calender.Monday equals 2, it is easy to calculate the number of days that need to be added to the current date.
Calendar date1 = Calendar.getInstance();
date1.set(2014, 05, 12);
int dayOfWeek = date1.get(Calendar.DAY_OF_WEEK);
date1.add(Calendar.DATE, (9 - dayOfWeek) % 7);