---
title: "Discussion on \"Why Mutable Objects Break HashSet\" | Hashnode"
description: "Discussion on \"Why Mutable Objects Break HashSet\". Mutate an object after adding it to a HashSet and the set can no longer find or remove it."
url: "https://hashnode.com/posts/why-mutable-objects-break-hashset/6a1cb01b8286e3686456dbc1"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why Mutable Objects Break HashSet](https://siddheshsawant.hashnode.dev/why-mutable-objects-break-hashset?utm_source=hashnode&utm_medium=feed)

Mutate an object after adding it to a HashSet and the set can no longer find or remove it.

May 31 · 7 min read · siddheshsawant.hashnode.dev  
Updated Nov 10  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#hashset](https://hashnode.com/tag/hashset)
-   [#hashsetinternals](https://hashnode.com/tag/hashsetinternals)
-   [#datastructures](https://hashnode.com/tag/datastructures)
-   [#backend](https://hashnode.com/tag/backend)

## Written by

[Siddhesh Sawant](https://hashnode.com/@siddheshsawant)

@siddheshsawant · Mumbai, India

  
[View profile](https://hashnode.com/@siddheshsawant)

Breaking down complex software engineering concepts with code and real-world examples

Backend Engineer with 5+ years of experience building and scaling high-performance microservices for large-scale e-commerce platforms. Have Expertise in Java, Spring Boot, Python and event-driven architectures, with proven ownership in designing Kafkabased systems, improving reliability and observability, and delivering high-impact customer-facing solutions

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
