3 ms·
Compact Strings were added in Java 9; https://openjdk.java.net/jeps/254 https://openjdk.java.net/jeps/254 So they can now be stored as one byte per character.
by diroussel 7y ago
Compact Strings were added in Java 9; https://openjdk.java.net/jeps/254 https://openjdk.java.net/jeps/254
So they can now be stored as one byte per character.
- kllrnohj 7y agoOnly for ASCII text. There is still no UTF-8 support (it's even called out as a non-goal in the JEP: "It is not a goal to use alternate encodings such as UTF-8 in the internal representation of strings.")