不是
这是JDK1.4.2的函数定义:
public boolean isLeapYear(int year) {
        return year >= gregorianCutoverYear ?
            ((year%4 == 0) && ((year%100 != 0) || (year%400 == 0))) : 
            // Gregorian
            (year%4 == 0); // Julian
    }

解决方案 »

  1.   

    我觉的这个函数有问题怎么是((year%4 == 0) && ((year%100 != 0) || (year%400 == 0)))和(year%4 == 0)这两个条件选一呢?我认为应该是 (year%4 == 0) && (year%100 != 0)和 (year%400 == 0)这两个条件选一吧.我也关注请高手指点一下.
      

  2.   

    I meet the same problem last week. It's not the bug.
    Gregorian Calendar starts from October 15, 1582, before that was the Julian Calendar. 
    Julian Calendar 的闰年就是 (year%4==0).
    解决办法:
    GregorianCalendar c=new GregorianCalendar();
    c.set(1000,1,1);
    c.isLeapYear(c.get(Calendar.YEAR)); //true; Julian Leap Year
    c.setGregorianChange(new Date(Long.MIN_VALUE)); // pure Gregorian Calendar
    System.out.println(c.isLeapYear(c.get(Calendar.YEAR))); // false