What character escape sequences are available in Java?

John Zukowski

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). The actual character literals are:

  • b - backspace
  • - tab
  • - linefeed
  • f - formfeed
  • - carriage return
  • " - double quote - backslash
About | Sitemap | Contact
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.