Java Locale hashCode() method

7 Nov 2024 | 1 min read

The hashCode() method of Java Locale class returns a hash code for this locale. This method overrides the hashCode.

Syntax

Return

It returns a hash code value for this locale.

Example 1

Output:

Locale: java_T_point HashCode for this locale: -1713116582 

Example 2

Output:

Locale1: java_T_point HashCode for locale1: -1713116582 Locale1: java_T_point HashCode for locale1: -1713116582