Java Double hashCode() methodThe hashCode() method of Java Double class returns the hash code for this Double. The result is obtained by performing exclusive OR operation on two halves of the long integer bit representation which is same as produced by the doubleToLongBits() method. OverridesThe hashCode() method of class Double overrides the hashCode() method of class Object SyntaxParameters1.NA 2.value - is the double value provided to hash Return valueThis method returns a hash code value for this double object. Example 1Output: 1. Hash Value = -1330324172 2. Hash Value = 1079230464 3. Hash Value = -482480461 4. Hash Value = 1637418694 Example 2Output: Enter your Adhar card No 5678 Your visit id is: 1085681152 Example 3Output: HAsh code value = 1079476224 Float value = 1079476224 Example 4Output: Error:(12, 35) java: incompatible types: int cannot be converted to java.lang.Double Next TopicJava-double-intvalue-method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India