Any Future Plans for Multiline Java String

Viewed 3758
4 Answers

Update April 2020

The JEP 326: Raw String Literals was withdrawn and is replaced by

JEP 368: Text Blocks (Second Preview).

This feature is released as a preview language feature in Java 14.

The supported syntax is:

String json = """
              {
                 "id": 10,
                 "name": "Joe",
                 "birthday": "1970-01-01"
              }
              """;

""" (fat delimiters) are used as delimiters for multiline strings.

Related