---
title: "Comment by Shai Almog on \"Difference Between String , StringBuilder And StringBuffer Classes\" | Hashnode"
description: "When you do String s = &quot;A&quot; + otherString; javac produces StringBuilder under the hood. Prior to JDK 1.5 it produced StringBuffer which was a major sou"
url: "https://hashnode.com/posts/difference-between-string-stringbuilder-and-stringbuffer-classes/616ab06053401f641ba19544/comment/616d67ea441bd36daa9583b7"
---

[Discussion](https://hashnode.com/posts/difference-between-string-stringbuilder-and-stringbuffer-classes/616ab06053401f641ba19544)

Comment [Difference Between String , StringBuilder And StringBuffer Classes](https://hashnode.com/posts/difference-between-string-stringbuilder-and-stringbuffer-classes/616ab06053401f641ba19544)

[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.
