Why Mutable Objects Break HashSet
20h ago · 6 min read · Most Java developers use HashSet every day.
Set<String> names = new HashSet<>();
We add elements, check if they exist, remove them, and move on.
But what if I told you that a single field modificatio