java.time.Year.getLong() 方法示例 java.time.Year.get() 方法示例 java.time.Year.getValue() 方法示例 java.time.Year.getLong() 方法示例 package com.codingdict; import java.time.Year; import java.time.temporal.ChronoField; public class YearDemo { public static void main(String[] args) { Year date = Year.of(2017); System.out.println(date.getLong(ChronoField.YEAR_OF_ERA)); } } java.time.Year.get() 方法示例 java.time.Year.getValue() 方法示例