Friday, October 05, 2007

Character Escape Codes in Java

provides escape sequences for several non-graphical characters. All characters can be specified as a hexidecimal Unicode character (\uxxxx) with some as an octal character (\ddd where the first d is limited to 0-3, and the others 0-7 - same as \u0000-\u00ff).

\n New line
\t Tab
\b Backspace
\r Carriage return
\f Formfeed
\\ Backslash
\' Single quotation mark
\" Double quotation mark
\d Octal
\xd Hexadecimal
\ud Unicode character

No comments: