码迷,mamicode.com
首页 > 编程语言 > 详细

Java 中的转义字符

时间:2015-10-28 21:00:09      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:

注意斜杠方向,为键盘右上角的斜杠


\t   在当前编辑位置插入一个 tab


\b   在当前编辑位置插入一个空格


\n   换行(在当前编辑位置插入 a newline)


\r   在当前编辑位置插入一个回车                  Insert a carriage return in the text at this point.


\f   在当前编辑位置插入换页符                     Insert a formfeed in the text at this point.


\‘   插入一个单引号字符


\"   插入一个双引号字符


\\   插入反斜杠字符

 

比如:System.out.println("She said \"Hello!\" to me.");

Java 中的转义字符

标签:

原文地址:http://www.cnblogs.com/tf-Y/p/4918339.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!