Top "Hashcode" questions

A hash code is a result of applying a hash function to data, usually resulting in an integer.

What's behind the hashCode() method for String in Java?

I've been investigating the hashCode() methods in java and found the one for String class strange. The source code is …

java hashcode
how to get hash code of a string in c++

Following java code returns hash code of a string. String uri = "Some URI" public int hashCode() { return uri.hashCode(); } I …

c++ string hash hashcode
Objects.hash() vs Objects.hashCode(), clarification needed

in Java 7 we have o.hashCode(); Objects.hashCode(o); Objects.hash(o); The first 2 are roughly the same with the …

hashcode java-7
What is the default implementation of `hashCode`?

If one does not override the hashCode method, what is the default implementation of hashCode ?

java hashcode
GetHashCode Guidelines in C#

I read in the Essential C# 3.0 and .NET 3.5 book that: GetHashCode()’s returns over the life of a particular object …

c# .net hashcode
Why is a SHA-1 Hash 40 characters long if it is only 160 bit?

The title of the question says it all. I have been researching SHA-1 and most places I see it being 40 …

encoding hash sha1 hashcode base32
Overriding equals() & hashCode() in sub classes ... considering super fields

Is there a specific rule on how Overriding equals() & hashCode() in sub classes considering super fields ?? knowing that there …

java inheritance overriding equals hashcode
How should equals and hashcode be implemented when using JPA and Hibernate

How should model class's equals and hashcode be implemented in Hibernate? What are the common pitfalls? Is the default implementation …

java hibernate orm equals hashcode
HashCode giving negative values

I am converting the incoming string into hash code by doing the following function but some of the values are …

java hashcode negative-number
Hashcode of an int

What is the hashcode of a primitive type, such as int? for example, let's say num was an interger. int …

java int hashcode primitive