Régóta nem így van, lásd Compressed strings Java 6 óta, és Compact Strings Java 9 óta. https://baeldung-cn.com/java-9-compact-string