3 ms·
Java does intern string literals and constants, but you can’t rely on reference equality unless you intern every string you create at runtime by formatting or d
by erik_seaberg 6y ago
Java does intern string literals and constants, but you can’t rely on reference equality unless you intern every string you create at runtime by formatting or decoding, and it isn’t specified whether that creates strong references that will never be GC’d.