在编译之前,每个Unicode字符都被其值替换,因此\u000a
代表新的行代码
// String st4="MN3444\u000ar4t4";
与此代码相同(注意后面的文本\u000a
将被移动到新行,这意味着它将不再是注释的一部分)
// String st4="MN3444 r4t4";
你可以测试一下
//\u000a;System.out.println("hello comment");
等于
// System.out.println("hello comment");
并将作为结果输出: hello comment
在编译之前,每个Unicode字符都被其值替换,因此\u000a
代表新的行代码
// String st4="MN3444\u000ar4t4";
与此代码相同(注意后面的文本\u000a
将被移动到新行,这意味着它将不再是注释的一部分)
// String st4="MN3444 r4t4";
你可以测试一下
//\u000a;System.out.println("hello comment");
等于
// System.out.println("hello comment");
并将作为结果输出: hello comment