What are all the escape characters?

后端 未结 4 1081
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 05:18

I know some of the escape characters in Java, e.g.

\\n : Newline
\\r : Carriage return
\\t : Tab
\\\\ : Backslash
...

Is there a complete l

4条回答
  •  爱一瞬间的悲伤
    2020-11-22 06:13

    These are escape characters which are used to manipulate string.

    \t  Insert a tab in the text at this point.
    \b  Insert a backspace in the text at this point.
    \n  Insert a newline in the text at this point.
    \r  Insert a carriage return in the text at this point.
    \f  Insert a form feed in the text at this point.
    \'  Insert a single quote character in the text at this point.
    \"  Insert a double quote character in the text at this point.
    \\  Insert a backslash character in the text at this point.
    

    Read more about them from here.

    http://docs.oracle.com/javase/tutorial/java/data/characters.html

提交回复
热议问题