Example usage for java.time Year plus

List of usage examples for java.time Year plus

Introduction

In this page you can find the example usage for java.time Year plus.

Prototype

@Override
public Year plus(long amountToAdd, TemporalUnit unit) 

Source Link

Document

Returns a copy of this year with the specified amount added.

Usage

From source file:Main.java

public static void main(String[] args) {
    Year y = Year.of(2014);
    Year l = y.plus(2, ChronoUnit.YEARS);
    System.out.println(l);/* www  .  ja  v a2 s . c  om*/

}