Character Escape Sequences

written by: Gabriela C. Perez; article published: year 2007, month 12;

In: Root » Computers and technology » JAVA

  Share  
|
  PL  |  NL  |  FR  |  ES  |  PT  |  IT  |  DE  |  DK  |  NO  |  SE  |  FI  |  GR  |  JP  |  CN  |  KR  |  RU  |  AE


Character escape sequences allow for a character to be interpreted differently than its literal value. Character escape sequences are defined using the backslash (\) character, followed by the escape sequence code. The following table shows a list of character escape sequences with a description of what they do.

Character Escape Sequence Description
\b Backspace
\f Form feed
\n New line
\r Carriage return
\t Tab
\u{hex} Unicode escape sequence
\\ Backslash character. This is how a backslash can be treated as just an actual backslash character.
\' Single quote. Define a single quote character so it is not treated as a character delimiter.
\" Double quote. Define a double quote character so it is not treated as a string delimiter.

Share

Disclaimer

1) E-articles is not responsible for the information contained by this article as well for any and all copyright infringements by authors and writers. E-articles is a free information resource. If you suspect this article for any copyright infringement, please read the terms of service and contact us or use the "Report this article" button on this page to investigate the problem.
2) E-articles is not responsible for inaccuracies, falsehoods, or any other types of misinformation this article may contain and will not be liable for any loss or damage suffered by a user through the user's reliance on the information gained here.