VOOZH about

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

⇱ Double hashCode() method in Java with examples - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Double hashCode() method in Java with examples

Last Updated : 11 Jul, 2025
The hashCode() method of Double class is a built-in method use to return the hashcode value of this Double object. Syntax:
DoubleObject.hashCode()
Parameters: It takes no parameters. Return Type: It returns an int value. The value returned is (int)(v^(v>>>32)) where v is a long variable equal to Double.doubleToLongBits(this.doubleValue()). Below is the implementation of hashCode() method: Example 1:
Output:
Hashcode Value of 118.698 : 1215072837
Example 2:
Output:
Hashcode Value of -30.0 : -1069678592
Comment