报告字符串或字符文字中的换行符 (\n) 和回车符 (\r)。 这些字符通常用作行分隔符,如果它们被硬编码,可移植性可能会受到影响。

示例:


  void test() {
    String str = "first\nsecond\rthird";
  }