public class List1<T> {
public static void main(String[] args) {
System.out.println("hello world\b");//退格符,往前退一格
System.out.println("-------------------");
System.out.println("hello wo\nrld hello world");//换行符
System.out.println("-------------------");
System.out.println("hello wor\rld");//回车(CR) ,将当前位置移到本行开头
System.out.println("--------------------");
System.out.println("hello wor\tld");//水平制表(HT) (跳到下一个TAB位置)
System.out.println("--------------------");
System.out.println("hello world\\");//左斜杠
System.out.println("--------------------");
System.out.println("hello\"蔡\" world");//双引号
}
}
输出结果如下:
hello worl
-------------------
hello wo
rld hello world
-------------------
ld
--------------------
hello wor ld
--------------------
hello world\
--------------------
hello"蔡" world
常见转义字符
最新推荐文章于 2024-07-27 13:31:57 发布