← All Exercises
Text Blocks for Multiline Strings
basicjava
Background
Text blocks replace string concatenation for multiline strings like SQL, JSON, and HTML.
Problem
Create multiline string literals using text blocks with proper indentation management.
Input
Multiline string content
Output
A formatted multiline string
Sample tests
Sample 1
Input: text block with SQL query
Expected: multiline SQL string
Your solution
Learning objective
Learn Java text blocks and string formatting