java.time.Year.with(TemporalField field, long newValue) java.time.Year.isLeap() Java.io.BufferedOutputStream.Write() 方法 java.time.Year.with(TemporalField field, long newValue) package com.codingdict; import java.time.Year; import java.time.temporal.ChronoField; public class YearDemo { public static void main(String[] args) { Year date = Year.parse("2017"); Year result = date.with(ChronoField.YEAR,2013); System.out.println(result); } } java.time.Year.isLeap() Java.io.BufferedOutputStream.Write() 方法