Java.lang.Character.hashCode() is a built-in method in Java which returns a hash code for this Character. The returned hash code is equal to the result of invoking charValue().
public int hashCode() This function does not accepts any parameter.
Return Value: This method returns a hash code value for this Character.
Below programs illustrate the Java.lang.Character.hashCode() function:
Hashcode of B is 66
Hashcode of 6 is 54
- Java.util.LinkedList.poll(), pollFirst(), pollLast() with examples in Java
- Java lang.Long.highestOneBit() method in Java with Examples
- Java.util.concurrent.Phaser class in Java with Examples
- Java lang.Long.builtcount() method in Java with Examples
- Java lang.Long.reverse() method in Java with Examples
- Java lang.Long.byteValue() method in Java with Examples
- Java.util.Collections.rotate() Method in Java with Examples
- Java.util.function.BiPredicate interface in Java with Examples
- Java.util.concurrent.RecursiveAction class in Java with Examples
- Java.util.function.IntPredicate interface in Java with Examples
- Java lang.Long.lowestOneBit() method in Java with Examples
- Java.util.function.LongPredicate interface in Java with Examples
- Java.util.function.DoublePredicate interface in Java with Examples
- Java.util.Collections.disjoint() Method in java with Examples
- Java lang.Long.numberOfLeadingZeros() method in Java with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.