Calendar.setMonth

Sets the month for the selected date.

The new date must be valid. For example, setting 1 (February) for the month when the day is 31, fails.

class Calendar
void
setMonth
(
int month
)

Parameters

month int

The desired month for the selected date (as a number between 0 and 11).