Javatpoint Logo
Javatpoint Logo

Java Calendar hashCode() Method

The hasgCode() method of java is method of object class and object class is ultimate super class of all classes in java. hashCode() method is overloaded by all other classes in java. This method returns hash code for calendar object.

Syntax

Parameter

No parameter is passed.

Returns

A hash code value for calendar object.

Throws

Does not throw Exception.

Example 1

Test it Now

Output:

The current time: Fri Aug 10 11:38:27 PDT 2018
 Hash Code  999473001

Example 2

Test it Now

Output:

current Time : Fri Aug 10 11:48:02 PDT 2018
Hash Code:999946776



Please Share

facebook twitter google plus pinterest