LocalDate 的使用

import java.util.Calendar;
import java.util.Scanner;
import java.time.LocalDate;

public class Main {
    public static void main(String[] args) {
        Scanner console = new Scanner(System.in);
        int year = console.nextInt();
        for(int i=1; i<=12; i++){
            System.out.println(year + "年" + i + "月:" +LocalDate.of(year,i,1).lengthOfMonth() + "天");
        }
        
    }
}