The SCJP Tip Line Strings, Literally
So what makes String literals so special? Well, first of all, it's very important to remember that String objects are immutable. That means that, once created, a String object cannot be changed (short of using something like reflection to get at private data). Immutable, you say? Unchangable? What about this code?
via https://www.javaranch.com/journal/200409/ScjpTipLine-StringsLiterally.html.
Tags: delicious-import, garbagecollection, immutable, java, string