Float hashCode() method in Java with examples
The hashCode() method method in Float Class is a built-in method in Java that return the hashcode value of this Float object.
public int hashCode()
Parameters: It takes no parameters.
Returns: The function returns a hash code value for this object.
Below is the implementation of hashCode() method:
Hashcode Value of 118.698 : 1122854240
Hashcode Value of -30.0 : -1041235968
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.