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

    Aug 25, 2010 · hashCode() is used for bucketing in Hash implementations like HashMap, HashTable, HashSet, etc. The value received from hashCode() is used as the bucket number for storing …

  2. 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 great job at …

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

    Oct 31, 2019 · A hashcode is an integer value that represents the state of the object upon which it was called. That is why an Integer that is set to 1 will return a hashcode of "1" because an Integer's …

  4. hashCode() purpose in Java - Stack Overflow

    HashCode is a encryption of an object and with that encryption java knows if the two of the objects for example in collections are the same or different . (SortedSet for an example)

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

    Mar 12, 2016 · El método hashCode no está asociado al uso de la evaluación del método equals. El método hashCode sirve para obtener un código hash que sería como un identificador del objeto. …

  6. 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) ?

  7. O que é Hashcode e qual sua finalidade? - Stack Overflow em Português

    Feb 14, 2017 · Tenho observado que a utilização de hashcode é utilizada em comparações, mas o que significa o termo? Sua utilização em programação é específica em comparação?

  8. What is hashCode used for? Is it unique? - Stack Overflow

    Jan 22, 2024 · Can I use this hashcode to uniquely identify an item? For example, I want to identify a picture or a song on the device, and check it whereabout. This could be done if the hashcode given …

  9. java - Hashcode of an int - Stack Overflow

    1 The java.lang.Integer.hashCode() method returns a hash code value for primitive value of int but represented as an Integer object.

  10. 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 …