17 ms·
Isn’t this concept originally from C#? (Where interning is the default behavior)
by pciexpgpu 4y ago
Isn’t this concept originally from C#? (Where interning is the default behavior)
- smarks 4y agoUnlikely, as Java’s string interning behavior was specified in the first edition of the JLS (1996). This predates C# as far as I know. https://download.oracle.com/otn-pub/jcp/jls1-spec/jls1.pdf?AuthParam=1655960553_b4987d0abe9cfd0c583f90405571146d https://download.oracle.com/otn-pub/jcp/jls1-spec/jls1.pdf?A... See section 3.10.5.
- robertlagrant 4y agoThe JVM interns string literals under the hood, yes.