Bits on info on Java strings
Update: I don’t keep IRC logs and thus cited the wrong guy. Sorry Vince.
On this blog entry I will take on an assertion stated by systemfault. He declared on the #programmeur IRC channel on Freenode that:
<systemfault> String foo = new String("lol"); est pareil que String foo = "lol";
<systemfault> Quand le compilo voit: String foo = "lol";
quand il compile, il va vraiment faire String foo = new String("lol");
Which in english means that:
String s = "hello";
is syntaxic sugar for:
String s = new String("hello");

[...] might have hinted about in in my previous post on the subject of strings in Java, yet I did not realize the significance of String.intern() method. The following code sample [...]
On String.intern() « lostwebsite.net blog
November 6, 2009 at 8:18 pm