But I also don't see that a lot of storage is saved. You still have the intern table. I guess, compared to what?
Bob
Michael Glavassevich wrote:
I do mean == (this also implies equals()), try running:
public class InternTest { public static void main (String [] args) { char [] buffer1 = {'a', 'b', 'c'}; char [] buffer2 = {'a', 'b', 'c'}; String one = new String(buffer1, 0, buffer1.length); String two = new String(buffer2, 0, buffer2.length); System.out.println(one.intern() == two.intern()); // true } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]