Answer the question
In order to leave comments, you need to log in
How is HashCode generated for string variables in Java?
Can we hope for the uniqueness of the number if the string is different?
String A = "AA";
String B = "BB";
String a = "aA";
// Всегда должно быть - "A.Equals(a) = false";
Answer the question
In order to leave comments, you need to log in
1. If you install raw Java, you can see the sources.
2. At the expense of uniqueness, I don’t remember exactly, but everything seems to be as you need. But it is better to look in the raw.
3. The uniqueness of the hash can be taken as the address of the object (for example, the this variable with casting for the type).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question