The October issue of Oracle’s Java magazine includes an article reminding us that Java 13 includes a long-awaited new features: text blocks.

With text blocks, Java 13 is making it easier for you to work with multiline string literals. You no longer need to escape the special characters in string literals or use concatenation operators for values that span multiple lines. You can also control how to format your strings. Text blocks — Java’s term for multiline strings — immensely improve the readability of your code…

A text block is defined using three double quotes (“””) as the opening and closing delimiters. The opening delimiter can be followed by zero or more white spaces and a line terminator. A text block value begins after this line terminator.

Share on Google+

of this story at Slashdot.

…read more

Source:: Slashdot