Increasing Decreasing calendar fieldssuggest change
roll() can be used to increase/decrease
Calendar calendar = new GregorianCalendar(2016, Calendar.MARCH, 31); // 31 March 2016
add() method affects all fields, and behaves effectively if one were to add or subtract actual dates from the calendar
The above operation removes six months from the calendar, taking us back to 30 September 2015.
To change a particular field without affecting the other fields, use
The above operation removes six months from the current month, so the month is identified as September. No other fields have been adjusted; the year has not changed with this operation.