Charset hashCode() method in Java with Examples
The hashCode() method is a built-in method of the java.nio.charset returns the computed hashcode of any given charset.
public final int hashCode()
Parameters: The function does not accepts any parameter.
Return Value: The function returns the computed hashcode for the charset.
Below is the implementation of the above function:
The hash code for ISO-2022-CN is 1450311218
The hash code for x-windows-949 is -1698752417
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.