Re:String Interning Done Right
by richardwhiuk on Saturday March 05, 2016 @05:51PM
(#11231476)
Yeah, the explanation in this article about Java's string interning made be lose confidence that the author knew what they were talking about. If you compare Strings, you should use .equals() or you are risking a logic error if you aren't very careful. Indeed, you can deliberately un-intern a string by doing new String("my string") (with little realistic value).
[ Parent
| on HN ]
There are no comments on this comment yet.