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


\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.");

相关文章: