Since month is initialized to zero and isn't changed afterwards, setting strMonth
to month
would only succeed in setting it to 0. By the looks of your code, it appears that you are trying to set the value of month
to strMonth
. To do this, replace:
strMonth = Integer.parseInt(month);
With the following:
month = Integer.parseInt(strMonth);