Skip to content

Latest commit

 

History

History
26 lines (11 loc) · 480 Bytes

Text Blocks in Java.md

File metadata and controls

26 lines (11 loc) · 480 Bytes

Text Blocks in Java

j

Java 15 introduced Text Blocks, which provide a convenient way to declare multi-line strings without the need for escape sequences or concatenation.

Example:

String html = """

          <html>

              <body>

                  <h1>Hello, World!</h1>

              </body>

          </html>

          """;