It depends on the JVM. Up to JDK 1.4, values from "-3" to "10" was cached -- meaning it will return the same
string reference for same values, in this range. After JDK 1.4, it will return a new string everytime. (BTW, not exactly sure when it switched over)
Regardless, this is more reason to use equals() to compare strings.
Henry