Javatpoint Logo
Javatpoint Logo

Java Collection hashCode() Method

The hashCode() method of Java Collection Interface returns the hash code value for this collection.

Syntax

Parameters

NA

Overrides

This method overrides hashCode in class Object

Return

The hashCode() method returns the hash code value for this collection.

Example 1

Test it Now

Output:

Hash Code : 8

Example 2

Test it Now

Output:

Hash Code : 157560278
Next TopicJava Collection





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA