Here you can find the source of getNextWeek(String week)
public static String getNextWeek(String week)
//package com.java2s; //License from project: Apache License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { public static String getNextWeek(String week) { return getDeltaWeek(week, 1); }//from www . j a va 2 s . com public static String getDeltaWeek(String week, int delta) { GregorianCalendar rightNow = new GregorianCalendar(); try { Date date = getDefaultWeekFormat().parse(week); rightNow.setTime(date); rightNow.add(Calendar.WEEK_OF_YEAR, delta); } catch (ParseException e) { e.printStackTrace(); } return getDefaultWeekFormat().format(rightNow.getTime()); } public static SimpleDateFormat getDefaultWeekFormat() { return new SimpleDateFormat("yyyyww"); } }