---
title: "Discussion on \"Java String Pool Explained: Why == Sometimes Lies\" | Hashnode"
description: "Discussion on \"Java String Pool Explained: Why == Sometimes Lies\". Learn how Java's String Pool works, why new String() breaks ==, and how .intern() fixes it — with examples and a common interview question."
url: "https://hashnode.com/posts/java-string-pool-explained-why-sometimes-lies/6a4b3506aa5b3a236601774f"
---

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

Discussion

# [Java String Pool Explained: Why == Sometimes Lies](https://cloudtuned.dev/java-string-pool-explained-why-sometimes-lies?utm_source=hashnode&utm_medium=feed)

Learn how Java's String Pool works, why new String() breaks ==, and how .intern() fixes it — with examples and a common interview question.

Mar 18, 2025 · 5 min read · cloudtuned.dev  
Updated Jul 8  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#fundamentals](https://hashnode.com/tag/fundamentals)
-   [#string-pool](https://hashnode.com/tag/string-pool)
-   [#jvm](https://hashnode.com/tag/jvm)
-   [#core-java-basics](https://hashnode.com/tag/core-java-basics)
-   [#java-interview-questions](https://hashnode.com/tag/java-interview-questions)

## Written by

[Cloud Tuned](https://hashnode.com/@cloudtuned)

@cloudtuned · Melbourne

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

Cloud

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
