Originally posted by Jesper Young: Three; it doesn't matter how many threads call this at the same time or how many times you execute the code. String literals are pooled.
And even if String literals weren't pooled, it would still be three, because every literal exists only once in the byte code.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Joined: Feb 20, 2007
And what about non-String objects? Say, for example, StringBuffer.