Example usage for java.time Year get

List of usage examples for java.time Year get

Introduction

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

Prototype

@Override 
public int get(TemporalField field) 

Source Link

Document

Gets the value of the specified field from this year as an int .

Usage

From source file:Main.java

public static void main(String[] args) {
    Year y = Year.of(2014);

    System.out.println(y.get(ChronoField.YEAR));

}