java.time.Year.adjustInto() 方法示例 java.time.Period.withYears() 方法示例 java.time.Year.atDay() 方法示例 java.time.Year.adjustInto() 方法示例 package com.codingdict; import java.time.LocalDate; import java.time.Year; public class YearDemo { public static void main(String[] args) { Year year = Year.of(2015); LocalDate date = LocalDate.now(); System.out.println(date); date = (LocalDate)year.adjustInto(date); System.out.println(date); } } java.time.Period.withYears() 方法示例 java.time.Year.atDay() 方法示例