The type of Calendar.FEBRUARY
and other constants in Calendar
class is int
. You should change getMonth
to an int
, to make the constructor compile. Or, directly use currentMonth - 1
in the constructor parameter, and by pass the creation of getMonth
variable.
P.S: getMonth
is really not a good name for a variable denoting a month. It's not a getter is it?