Example usage for java.time MonthDay with

List of usage examples for java.time MonthDay with

Introduction

In this page you can find the example usage for java.time MonthDay with.

Prototype

public MonthDay with(Month month) 

Source Link

Document

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

Usage

From source file:Main.java

public static void main(String[] args) {
    MonthDay m = MonthDay.now();
    MonthDay n = m.with(Month.JANUARY);
    System.out.println(n);/*from  w  w  w.j  av a  2 s . c  om*/

}