Java Calendar hashCode() Method

The hashCode() 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

Output:

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

Example 2

Output:

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

Next TopicJava Process