3 ms·
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 St
by richardwhiuk 11y ago
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).