java-闰年的判断 GregorianCalendar

 
package com.rj.bd.new_one;

import java.util.GregorianCalendar;
/**
 * @desc  闰年的判断
 * @time 2019-09-08
 * @author yhx
 *
 */
public class RunNina {

    public static void main(String[] args) {
        int year = 2020;
        GregorianCalendar gc = new GregorianCalendar();
        boolean result = gc.isLeapYear(year);
        System.out.println(result);
    }

}

 

posted @ 2019-09-08 17:45  最最最可爱的核心宝儿  阅读(239)  评论(0编辑  收藏  举报