在下面的示例中,空格和制表符被分别呈现为 · 和 ␉,在编辑器中,一个制表符相当于 2 个空格。
示例:
String colors = """
····red
␉ ␉ green
····blue""";
When printing such a string, the result will be:
··red
green
··blue
After the compiler removes an equal number of whitespace characters from the beginning of each line, some lines remain with leading spaces.
2021.1 最新变化