java.time.YearMonth.atEndOfMonth() 方法示例


java.time.YearMonth.atEndOfMonth() 方法示例

package com.codingdict;

import java.time.LocalDate;
import java.time.YearMonth;

public class YearMonthDemo {
   public static void main(String[] args) {

      YearMonth date = YearMonth.of(2015,12);

      LocalDate date1 = date.atEndOfMonth();
      System.out.println(date1);  
   }
}