- Beginning with JDK 15, java supports text blocks.
- it is a new kind of literal that is composed of a sequence of characters that can occupy more than one line.
class Main{
public static void main(String[] args){
String message = """
Hello John,
This is a simple text block demo.
it supports multiline texts
no more "\\n" in the texts.
""";
System.out.println(message);
}
}