VOOZH about

URL: https://www.geeksforgeeks.org/java/charset-hashcode-method-in-java-with-examples/

⇱ Charset hashCode() method in Java with Examples - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Charset hashCode() method in Java with Examples

Last Updated : 28 Mar, 2019
The hashCode() method is a built-in method of the java.nio.charset returns the computed hashcode of any given charset. Syntax:
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: Program 1:
Output:
The hash code for ISO-2022-CN is 1450311218
Program 2:
Output:
The hash code for x-windows-949 is -1698752417
Reference: https://docs.oracle.com/javase/10/docs/api/java/nio/charset/Charset.html#hashCode()
Comment
Article Tags: