Hi David Is that all unique occurences of each unique String within the JVM? If so, there is still creation, and garbage disposal once the String goes out of scope, yes?
Scott Barr www.exergonic.com.au On Mon, 2003-03-10 at 14:39, David M. Karr wrote: > >>>>> "Scott" == Scott Barr <[EMAIL PROTECTED]> writes: > > Scott> Also, every time you reference a String literal, an object is created. > Scott> Using the static constant avoids this. Just good practice. > Scott> Saving the creation of a couple of objects is moot, but on large > Scott> projects on stressed servers, every little bit counts. > > Actually, all occurrences of the same unique string constant reference the same > interned String object, whether it's referenced from a constant definition, or > the raw string itself (you can verify this by comparing two identical strings > with "=="). Nevertheless, referencing string constants is still better than > referencing the raw string.

