Example usage for java.time MonthDay withMonth

List of usage examples for java.time MonthDay withMonth

Introduction

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

Prototype

public MonthDay withMonth(int 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.withMonth(1);
    System.out.println(n);/*from  w ww . ja  v a  2  s  .  c  o  m*/

}