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