java.time.Year.isBefore() 方法示例 java.time.Year.isAfter() 方法示例 java.time.Year.isLeap() 方法示例 java.time.Year.isBefore() 方法示例 package com.codingdict; import java.time.Year; public class YearDemo { public static void main(String[] args) { Year date = Year.of(2016); Year date1 = Year.of(2017); System.out.println(date1.isBefore(date)); } } java.time.Year.isAfter() 方法示例 java.time.Year.isLeap() 方法示例