Java 15 major language and API improvements
Java ⑮ has been released in September 2020.
The following content is summarizing the most important changes to the Java API, the Java language, and the JVM introduced with Java ⑮.
For a more complete overview follow the links in the following sections referring to the official Oracle release documents.
Java 15 Language improvements
The following describes selected improvements of the Java language. See the Java 15 release notes.
With JEP 378, Text Blocks introduced in Java 13 are now moving from preview state to general availability.
Java 15 is introducing the following language enhancements as developer preview.
We are not diving into the details of these preview features and defer that until they are moving from preview for general availability.
Text Block
var happy=String.format("""
With Java %s finally multiline text blocks (JEP 378) have arrived.
Line breaks covered and substitution supported.
""", 15);
Java 15 API improvements
The following describes selected improvements of the Java API. See the Java 15 release notes.
CharSequence
CharSequence happy = String.format("""
With Java %s finally multiline text blocks (JEP 378) have arrived.
Line breaks covered and substitution supported.
""", 15);
assertFalse(happy.isEmpty());