Example usage for java.time Period plusYears

List of usage examples for java.time Period plusYears

Introduction

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

Prototype

public Period plusYears(long yearsToAdd) 

Source Link

Document

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

Usage

From source file:Main.java

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

    Period l = p.plusYears(12);
    System.out.println(l);//from  ww  w.  ja v  a 2  s  .co  m

}