Advertisements

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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Advertisements

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

Join 8,341 other followers

Tweets

%d bloggers like this: