public class ZhuYiZiFu {
public static void main(String[] args) {
System.out.println("Hello\n World");
System.out.println("Hello\\n World");
}
}

本文通过一个简单的Java程序示例展示了如何在控制台输出包含转义字符的字符串。程序使用了两种不同的方式来展示转义与非转义的效果。
public class ZhuYiZiFu {
public static void main(String[] args) {
System.out.println("Hello\n World");
System.out.println("Hello\\n World");
}
}

2230
1732

被折叠的 条评论
为什么被折叠?