Example usage for java.time Period plusMonths

List of usage examples for java.time Period plusMonths

Introduction

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

Prototype

public Period plusMonths(long monthsToAdd) 

Source Link

Document

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

Usage

From source file:Main.java

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

    Period l = p.plusMonths(12);
    System.out.println(l);//  w  w  w .  j  a  va 2 s.  co  m

}