What Every Java Programmer Should Know About Strings
Talkat JCON Europe 2023 · on Tuesday, 2023-06-20· at 16:00· Cinema 7, Im Mediapark 1, 50670 Köln, Germany·
summary
Covers concrete JVM changes: Java 9 replaces char[] with a byte[] plus a coder flag so compact strings (JEP 254) uses one byte for Latin1 and two for UTF‑16, Java 7 removed substring offsets to avoid retained-large-string leaks, string deduplication (G1 only) deduplicates backing byte arrays (available since Java 8u20) and cut Eclipse IDE heap by about 25% in a case study, and concatenation moves to invokedynamic string concat (stringConcatFactory) since Java 9; recent builds show string hashCode ~6× faster and String.format ~3× faster in Java 17 vs 16.
AI-written summary · about
chapters (7)
- 0:00Introduction to strings
- 3:58String pool and interning
- 16:46Compact strings in Java
- 26:20Compressed strings history
- 27:25String deduplication
- 33:18Indify string concatenation
- 38:02JDK improvements summary








