java.time.Year.equals() 方法示例 java.time.Year.compareTo() 方法示例 java.time.Year.format() 方法示例 java.time.Year.equals() 方法示例 package com.codingdict; import java.time.Year; public class YearDemo { public static void main(String[] args) { Year date = Year.of(2005); Year date1 = Year.of(2006); System.out.println(date.equals(date1)); } } java.time.Year.compareTo() 方法示例 java.time.Year.format() 方法示例