14 September 2020

Java 15 new features

 On september 15th Java SE 15 is released, along with some preview features, these are the new features:

Hidden classes

Classes that are dynamically generated by frameworks that can not be discovered (and thus not directly used) through reflection.

Text blocks

Support for strings containing newlines. Text blocks are delimited using """ (triple double quote).
Indent and trailing spaces are removed from such strings (i.e. you can paste in indented code, the blanks will be removed).
Normal string escape characters (\n, \t,...) apply, and some extra escape characters are added:
\
\ at the end of a line: escapes the newline (the newline will not appear in the final string)
\s
A hard space. This space (and any preceding spaces) will not be removed, even if it is a trailing space.

No comments:

Post a Comment