转义字符

夙愿已清 提交于 2019-11-29 03:38:43

转义字符

  • \ 就是转义符号,将后面紧跟的字母转变含义。
    n --> \n 换行
    t --> \t 制表符,将制表符前面的字符串补全为8个字符。
    " --> " 原来用于标识字符串,转义后就表示双引号。
		System.out.println("helloworld");
		System.out.println("hello\tworld");// 3
		System.out.println("hell\tworld");// 4
		System.out.println("hel\tworld");// 5
		System.out.println("he\tworld");// 6
		System.out.println("\tworld");// 8
		System.out.println("我是\"Roman\"");
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!