java.time.Year.with() 方法示例 java.time.Year.until() 方法示例 java.time.YearMonth.adjustInto() 方法示例 java.time.Year.with() 方法示例 package com.codingdict; import java.time.Year; public class YearDemo { public static void main(String[] args) { Year date = Year.parse("2017"); Year result = date.with(Year.of(2010)); System.out.println(result); } } java.time.Year.until() 方法示例 java.time.YearMonth.adjustInto() 方法示例