Example usage for java.time OffsetTime getLong

List of usage examples for java.time OffsetTime getLong

Introduction

In this page you can find the example usage for java.time OffsetTime getLong.

Prototype

@Override
public long getLong(TemporalField field) 

Source Link

Document

Gets the value of the specified field from this time as a long .

Usage

From source file:Main.java

public static void main(String[] args) {
    OffsetTime m = OffsetTime.now();
    long z = m.getLong(ChronoField.HOUR_OF_DAY);
    System.out.println(z);/*from   www .jav a  2s . c o m*/

}