java.time.YearMonth.query() 方法示例 java.time.YearMonth.plusYears() 方法示例 java.time.YearMonth.range() 方法示例 java.time.YearMonth.query() 方法示例 package com.codingdict; import java.time.YearMonth; import java.time.temporal.TemporalQueries; public class YearMonthDemo { public static void main(String[] args) { YearMonth date = YearMonth.parse("2014-12"); System.out.printf("YearMonth precision is %s%n", date.query(TemporalQueries.precision())); } } java.time.YearMonth.plusYears() 方法示例 java.time.YearMonth.range() 方法示例