你把电脑系统时间改成1月,再执行代码你就知道了

解决方案 »

  1.   

    取法的问题,看下源码/**
         * Field number for <code>get</code> and <code>set</code> indicating the
         * month. This is a calendar-specific value. The first month of
         * the year in the Gregorian and Julian calendars is
         * <code>JANUARY</code> which is 0; the last depends on the number
         * of months in a year.
         *
         * @see #JANUARY
         * @see #FEBRUARY
         * @see #MARCH
         * @see #APRIL
         * @see #MAY
         * @see #JUNE
         * @see #JULY
         * @see #AUGUST
         * @see #SEPTEMBER
         * @see #OCTOBER
         * @see #NOVEMBER
         * @see #DECEMBER
         * @see #UNDECIMBER
         */
        public final static int MONTH = 2;