You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b1dfbf8
Browse filesBrowse the repository at this point in the historyBrowse files
Intern string literals and implement String.intern()
ldc of a string constant now returns a single interned instance per
content (JVMS 5.1), so equal literals compare equal by reference;
String.intern() shares the same pool. new String(...) stays distinct,
so == still reflects identity. The pool is a GC root, keeping interned
strings alive across collection.
0 commit comments