월별 일자수 구하기,,,& 1001년 부터 2499년 까지 윤년구하기

import java.time.YearMonth;

public class number_of_days_per_month {

	public static void main(String[] args) {

            int year = 2020;
            int month = 2;
            YearMonth yearMonthObject = YearMonth.of(year, month);
            int daysInMonth = yearMonthObject.lengthOfMonth();

            System.out.println(daysInMonth);


            int loopCnt = 0;
            for( loopCnt=1001; loopCnt < 2500 ; loopCnt++ )
            {	
                year = loopCnt;
                month = 2;
                yearMonthObject = YearMonth.of(year, month);
                daysInMonth = yearMonthObject.lengthOfMonth();
                if( daysInMonth == 29 )
                {
                    System.out.println( loopCnt + " 년은 윤년입니다.");	
                }else {
                    System.out.println( loopCnt + " 년은 윤년이 아닙니다.");
                }		

            }  

	}
}