What the meaning of various types of white space in Java?

Praveen picture Praveen · Mar 17, 2010 · Viewed 16.4k times · Source

What is difference of below escape sequences for white space?

\t, \n, \x0B, \f and \r.

Answer

b.roth picture b.roth · Mar 17, 2010
  • \t      The tab character (\u0009)
  • \n      The newline (line feed) character (\u000A)
  • \r      The carriage-return character (\u000D)
  • \f      The form-feed character (\u000C)
  • \x0B  The vertical tabulation (VT) character