March 2019
Intermediate to advanced
242 pages
6h 21m
English
You can define a multiline string value by using raw literals, as follows:
String html =
`<HTML>
<BODY>
<H1>Meaning of life</H1>
</BODY>
</HTML>
`;
By using ` as the opening and closing delimiter, you can define multiline string literals with ease and elegance.
The preceding code is free from Java indicators (concatenation operators or escape sequences).
Read now
Unlock full access