Compact strings [JEP 254]
The string data type is an important part of nearly every Java app. While JEP 254's aim was to make strings more space-efficient, it was approached with caution so that existing performance and compatibilities would not be negatively impacted.
Pre-Java 9 status
Prior to Java 9, string data was stored as an array of chars. This required 16 bits for each char. It was determined that the majority of String objects could be stored with only 8 bits, or 1 byte of storage. This is due to the fact that most strings consist of Latin-1 characters.
Note
The ISO Latin-1 Character Set is a single-byte set of character's encodings.
New with Java 9
Starting with Java 9, strings are now internally represented using a byte array along with a flag field for encoding references.