When working on recent project, here is a common mistake I encountered with an equivalent code snitbit If HashSet does not allow duplicates, why do the following two objets (w1 and w2 return true)? Issue According to the Java specification, whenever you override equals() you need to override hashCode() too. HashSet uses both hashCode() first toContinue reading “HashSet and HashCode reminder”