Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, 7);
Calendar cal = Calendar.getInstance(); cal.add(Calendar.HOUR, 3);
Calendar cal = Calendar.getInstance(); cal.add(Calendar.MONTH, 1);The code above creates a Calendar object and adds 1 month to it using the add() method with the Calendar.MONTH field. All of the examples above use the java.util package library that contains the Calendar class for manipulating dates and times.