In this chapter, you will learn
What text blocks are
How to represent text blocks in your code
The formatting rules for text blocks
Changes to the String API to support text blocks
How to detect inconsistent use of whitespaces in text blocks
The Background
Rarely you write a Java program without dealing with strings. Java supports strings as instances of the String class since version 1.0. It also supports String literals, which are sequences of zero or more characters enclosed in double quotes. String literals are represented in the source code, and they are instances of the String class. The biggest pain points ...