求解答一下,java串联替换成文本块,替换后报错:Java:未结束的字符串文字
.
.
代码:
System.out.println("No bottles of beer on the wall,\n" +
"no bottles of beer,\n" +
"ya' can't take one down, ya' can't pass it around,\n" +
"'cause there are no more bottles of beer on the wall!");
这是 jdk11~jdk17 的新特性,支持Text Blocks(文本块)-跨越多行字符串