Aatul Palandurkar

Escape Sequences in Java

Posted on: June 12, 2011

 

Objectives :

  • What are the escape sequences in Java?
  • What are the escape characters in Java?

 

Generally we enter all the characters directly. The escape sequences are used for those characters which cannot be entered directly.

Sequence Purpose
\n New Line (i.e. Line feed)
\b Backspace
\t Tab
\r Carriage return
\f Form Feed
\\ Backslash
\’ Single quote
\” Double quote
\ddd Octal Characters (i.e. ddd)
\uxxxx Hexadecimal Unicode Characters (i.e. xxxx)

Escape Sequences in Java

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 13,261 other followers

Tweets

YouTube

Archives

%d bloggers like this: