java.time.MonthDay.equals() 方法示例 java.time.MonthDay.compareTo() 方法示例 java.time.MonthDay.format() 方法示例 java.time.MonthDay.equals() 方法示例 package com.codingdict; import java.time.MonthDay; public class MonthDayDemo { public static void main(String[] args) { MonthDay date = MonthDay.parse("--12-30"); System.out.println(date); MonthDay date1 = MonthDay.parse("--12-20"); System.out.println(date1); System.out.println(date1.equals(date)); } } java.time.MonthDay.compareTo() 方法示例 java.time.MonthDay.format() 方法示例