java.time.YearMonth.lengthOfMonth() 方法示例 java.time.YearMonth.isValidDay() 方法示例 java.time.YearMonth.lengthOfYear() 方法示例 java.time.YearMonth.lengthOfMonth() 方法示例 package com.codingdict; import java.time.YearMonth; public class YearMonthDemo { public static void main(String[] args) { YearMonth date = YearMonth.of(2016,12); System.out.println(date.lengthOfMonth()); } } java.time.YearMonth.isValidDay() 方法示例 java.time.YearMonth.lengthOfYear() 方法示例