How Many Objects Does `String a = "abc"` Actually Create in Java?
This article explains how Java handles string literals and `new String()` expressions, detailing when objects are created in the string constant pool versus the heap, and demonstrates the resulting reference comparisons with example code.
