I\'ve come across a class that includes multiple uses of a string literal, \"foo\".
What I\'d like to know, is what are the benefits and impact (in terms of object c
From the JLS Compile-time constants of type String are always "interned" so as to share unique instances, using the method String.intern.
So, no, there's gonna be only one string object.
As Mark notes, this is strictly the question of maintainability and not performance.