Example usage for java.time Duration hashCode

List of usage examples for java.time Duration hashCode

Introduction

In this page you can find the example usage for java.time Duration hashCode.

Prototype

@Override
public int hashCode() 

Source Link

Document

A hash code for this duration.

Usage

From source file:Main.java

public static void main(String[] args) {
    Duration duration = Duration.between(LocalTime.MIDNIGHT, LocalTime.NOON);
    System.out.println(duration.getSeconds());
    System.out.println(duration.hashCode());
}