Answers for "java multiline string"

1

java multiline string

//text blocks were introduced in Java 13 as a Preview feature and in Java 15 as a full feature:
String a = """""";   // no line terminator after opening delimiter
String b = """ """;  // no line terminator after opening delimiter
String c = """
           ";        // no closing delimiter (text block continues to EOF)
String d = """
           abc \ def
           """;      // unescaped backslash (see below for escape processing)
  
String html = """
              <html>
                  <body>
                      <p>Hello, world</p>
                  </body>
              </html>
""";
Posted by: Guest on April-06-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language