About 1,360,000 results
Open links in new tab
  1. What is the use of hashCode in Java? - Stack Overflow

    Aug 25, 2010 · The hashcode for an object is always the same if the object doesn't change. Functions like HashMap, HashTable, HashSet, etc. that need to store objects will use a …

  2. How is hashCode() calculated in Java - Stack Overflow

    Oct 31, 2019 · Object.hashCode (), if memory serves correctly (check the JavaDoc for java.lang.Object), is implementation-dependent, and will change depending on the object (the …

  3. ¿Equals y HashCode? Java - Stack Overflow en español

    Mar 12, 2016 · Al no sobre-escribir equals, lo que hace este método es comparar el hashCode de las instancias? ¿Para qué me ayuda sobre-escribir el método hashCode?

  4. Best implementation for hashCode method for a collection

    How do we decide on the best implementation of hashCode() method for a collection (assuming that equals method has been overridden correctly) ?

  5. Qual a importância de implementar o método hashCode em Java?

    Mar 31, 2014 · A comparação de objetos é feita através do resultado do método equals(). A implementação correta do hashCode() é aquela que sempre retorna o mesmo valor quando …

  6. how does the hashCode() method of java works? - Stack Overflow

    Dec 24, 2009 · The hashCode() of Object is actually a native method and the implementation is actually not pure Java. Now, regarding the how it works, this answer from Tom Hawtin does a …

  7. Why do I need to override the equals and hashCode methods in …

    Equals and Hashcode methods in Java They are methods of java.lang.Object class which is the super class of all the classes (custom classes as well and others defined in java API).

  8. java - How do hashCode () and identityHashCode () work at the …

    Dec 5, 2020 · How do Object.hashCode () and System.identityHashCode () work at the back end? Assuming that it hasn't been overridden, the Object.hashCode() method simply calls …

  9. java - Understanding the workings of equals and hashCode in a …

    What if hashCode() is always the same?: HashMap maps all keys into one big bucket. In this case, your code is functionally correct, but the use of HashMap is practically redundant, as any …

  10. integer - Java Array HashCode implementation - Stack Overflow

    Apr 10, 2013 · The java.lang.Array hashCode method is inherited from Object, which means the hashcode depends on the reference. To get the hashcode based on the content of the array …