strings: Java Strings deep dive companion code (pool/intern, indy concat vs StringBuilder JMH, text blocks, string templates)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KqJyCidz3ZgRyHABv2GVJh
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
literal == literal : true
|
||||
literal == new String : false
|
||||
literal.equals(new String) : true
|
||||
literal == c.intern() : true
|
||||
constant + literal == "hello" : true
|
||||
runtime concat == "hello" : false
|
||||
runtime concat.intern() == "hello": true
|
||||
built "java".intern() == the built instance : false
|
||||
built unseen string .intern() == the built instance: true
|
||||
Reference in New Issue
Block a user