java.time.YearMonth.isSupported() 方法示例 java.time.YearMonth.isLeapYear() 方法示例 java.time.YearMonth.isSupported(TemporalUnit unit) java.time.YearMonth.isSupported() 方法示例 package com.codingdict; import java.time.YearMonth; import java.time.temporal.ChronoField; public class YearMonthDemo { public static void main(String[] args) { YearMonth date = YearMonth.of(2020,11); System.out.println(date.isSupported(ChronoField.ERA)); } } java.time.YearMonth.isLeapYear() 方法示例 java.time.YearMonth.isSupported(TemporalUnit unit)