Skip to main content
formatting…
Source Link
5gon12eder
  • 7.2k
  • 2
  • 25
  • 29

If I am using just HashmapHashMap can I override only hashcodehashCode method?

If I need to use only HashMapHashMap, why do I need to override equals() method along with hashcodehashCode()? How will not implemeting equals()implementing equals() affect the working of HashMapHashMap?

If I am using just Hashmap can I override only hashcode method?

If I need to use only HashMap, why do I need to override equals() method along with hashcode()? How will not implemeting equals() affect the working of HashMap?

If I am using just HashMap can I override only hashCode method?

If I need to use only HashMap, why do I need to override equals() method along with hashCode()? How will not implementing equals() affect the working of HashMap?

Remove tag from title. Spaces. hashcode (not hashCode). Add relevant tags.
Source Link

JAVA : IfI If I am using just Hashmap can I override only hashcode method?

If I need to use only HashMap, why do I need to override equals()equals() method along with hashCode()hashcode()? How will not implemeting equals() affect the working of hashmapHashMap?

JAVA : IfI am using just Hashmap can I override only hashcode method?

If I need to use only HashMap why do I need to override equals() method along with hashCode()? How will not implemeting equals() affect the working of hashmap

If I am using just Hashmap can I override only hashcode method?

If I need to use only HashMap, why do I need to override equals() method along with hashcode()? How will not implemeting equals() affect the working of HashMap?

Source Link

JAVA : IfI am using just Hashmap can I override only hashcode method?

If I need to use only HashMap why do I need to override equals() method along with hashCode()? How will not implemeting equals() affect the working of hashmap