Tagged articles
6 articles
Page 1 of 1
Architect's Tech Stack
Architect's Tech Stack
Nov 27, 2020 · Backend Development

When Does Java Use StringBuilder for String Concatenation?

This article investigates Java's string concatenation behavior, demonstrating through two examples why some concatenations invoke StringBuilder while others are optimized by the compiler, and explains the underlying bytecode differences revealed by decompiling with javap.

Compiler OptimizationJavaJavap
0 likes · 3 min read
When Does Java Use StringBuilder for String Concatenation?
Programmer DD
Programmer DD
Jan 22, 2019 · Backend Development

Why Your Java String Concatenation Is Slowing Down and How to Fix It

This article examines how different Java string concatenation techniques impact performance, demonstrates compile‑time optimizations and bytecode generation, and provides practical recommendations—such as using StringBuilder—to avoid costly object creation inside loops.

JDKJavaJavap
0 likes · 8 min read
Why Your Java String Concatenation Is Slowing Down and How to Fix It