Java Timestamp hashCode() Method

The hashCode() method of Timestamp class returns a hash code value for this object.

Syntax

Parameters

NA

Returns

The hashCode() method of Timestamp class returns a hash code value for this object.

Example 1

Output:

Timestamp : 2018-09-01 09:01:15.0
Hash code : -1825617187

Example 2

Output:

Hash code for current timestamp : -1825616780