As developers we often only notice the new language features whenever a new
Java version comes out, but a lot of improvements are done under the covers. The JVM has a lot of sophisticated tricks to make your Java programs run fast.
In Java 8 update 20 a new experimental feature was added,
string deduplication. Since it's experimental you have to enable it explicitly before it works. For some applications it can lower memory usage.
I found this blog post that describes it:
String Deduplication – A new feature in Java 8 Update 20.
(Not written by anyone I have any connection with, I just found it interesting to learn about this new feature).
The Java compiler itself does something similar with string literals (the famous string pool about which so many people are asking questions about on the forum), but this is about a similar feature which works at runtime, not at compile time.