java multiline string

Solutions on MaxInterview for java multiline string by the best coders in the world

showing results for - "java multiline string"
Asma
22 Oct 2017
1//text blocks were introduced in Java 13 as a Preview feature and in Java 15 as a full feature:
2String a = """""";   // no line terminator after opening delimiter
3String b = """ """;  // no line terminator after opening delimiter
4String c = """
5           ";        // no closing delimiter (text block continues to EOF)
6String d = """
7           abc \ def
8           """;      // unescaped backslash (see below for escape processing)
9  
10String html = """
11              <html>
12                  <body>
13                      <p>Hello, world</p>
14                  </body>
15              </html>
16""";