Text blocks, introduced in Java 15, provide a cleaner way to handle multiline strings without concatenation operators or escape sequences. They use triple quotes (""") as delimiters and automatically handle indentation based on the leftmost non-whitespace character. Text blocks are particularly useful for JSON, HTML, XML, SQL
Table of contents
An example – what are the existing pain pointsSyntax of TextBlocksMore about TextBlocksPractical examples – where to use Text BlocksCode Migrations – using text blocks instead of a regular stringSummary2 Comments
Sort: