java.time.YearMonth.of(int year,Month month) java.time.YearMonth.of() 方法示例 java.time.YearMonth.parse() 方法示例 java.time.YearMonth.of(int year,Month month) package com.codingdict; import java.time.Month; import java.time.YearMonth; public class YearMonthDemo { public static void main(String[] args) { YearMonth year = YearMonth.of(2017,Month.DECEMBER); System.out.println(year); } } java.time.YearMonth.of() 方法示例 java.time.YearMonth.parse() 方法示例