java.time.YearMonth.plusMonths() 方法示例 java.time.YearMonth.plus(TemporalAmount amountToAdd) java.time.YearMonth.plusYears() 方法示例 java.time.YearMonth.plusMonths() 方法示例 package com.codingdict; import java.time.YearMonth; public class YearMonthDemo { public static void main(String[] args) { YearMonth date = YearMonth.parse("2017-12"); YearMonth date1 = date.plusMonths(10); System.out.println(date1); } } java.time.YearMonth.plus(TemporalAmount amountToAdd) java.time.YearMonth.plusYears() 方法示例