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
Those string literals are internalized, so no new String objects are created in the loop. Using the same literal twice could still be a sign for code smell, though; but not in terms of speed or memory usage.