java.time.Year.now(ZoneId zone) java.time.Year.now(Clock clock) java.time.Year.of() 方法示例 java.time.Year.now(ZoneId zone) package com.codingdict; import java.time.Year; import java.time.ZoneId; public class YearDemo { public static void main(String[] args) { Year date = Year.now(ZoneId.systemDefault()); System.out.println(date); } } java.time.Year.now(Clock clock) java.time.Year.of() 方法示例