Example usage for java.time LocalDate withMonth

List of usage examples for java.time LocalDate withMonth

Introduction

In this page you can find the example usage for java.time LocalDate withMonth.

Prototype

public LocalDate withMonth(int month) 

Source Link

Document

Returns a copy of this LocalDate with the month-of-year altered.

Usage

From source file:Main.java

public static void main(String[] args) {
    LocalDate a = LocalDate.of(2014, 6, 30);
    LocalDate b = a.withMonth(10);
    System.out.println(b);/*from  w  ww .ja v a2 s .  c  om*/
}