Example usage for java.time Period withMonths

List of usage examples for java.time Period withMonths

Introduction

In this page you can find the example usage for java.time Period withMonths.

Prototype

public Period withMonths(int months) 

Source Link

Document

Returns a copy of this period with the specified amount of months.

Usage

From source file:Main.java

public static void main(String[] args) {
    Period p = Period.ofMonths(1);

    Period l = p.withMonths(10);
    System.out.println(l);//w  w w  .j  a v a  2  s.c  o  m

}