---
title: "Discussion on \"Difference Between String , StringBuilder And StringBuffer Classes\" | Hashnode"
description: "Discussion on \"Difference Between String , StringBuilder And StringBuffer Classes\". String\nString is immutable ( as soon as created can not be changed )item . The item created as a\nString is saved inside the constant string pool.\nEach immutable object in java is thread secure ,that means string is also thread safe . String\nCannot be..."
url: "https://hashnode.com/posts/difference-between-string-stringbuilder-and-stringbuffer-classes/616ab06053401f641ba19544"
---

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

Discussion

# [Difference Between String , StringBuilder And StringBuffer Classes](https://preetimath.hashnode.dev/difference-between-string-stringbuilder-and-stringbuffer-classes?utm_source=hashnode&utm_medium=feed)

String String is immutable ( as soon as created can not be changed )item . The item created as a String is saved inside the constant string pool. Each immutable object in java is thread secure ,that means string is also thread safe . String Cannot be...

Oct 16, 2021 · 2 min read · preetimath.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#string](https://hashnode.com/tag/string)

## Written by

[Preeti Math](https://hashnode.com/@preetimath)

@preetimath · Hyderabad, India

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

IT operations @ Amazon

## Responses 1

Markdown supported · ⌘↵ to post

[Shai Almog](https://hashnode.com/@talktotheduck)

[Oct 18, 2021](https://hashnode.com/posts/difference-between-string-stringbuilder-and-stringbuffer-classes/616ab06053401f641ba19544/comment/616d67ea441bd36daa9583b7)

When you do `String s = "A" + otherString;`

javac produces `StringBuilder` under the hood. Prior to JDK 1.5 it produced `StringBuffer` which was a major source of performance overhead in Java.
