Escape Sequences in Java





  • The Java programming language also supports a few special escape sequences for char and String literals:
  • These can be represented by using escape sequences represented by a backslash(\) followed by one or more characters.
ESC. SEQUNICODEDESCRIPTION
\b\u0008Backspace
\t\u0009Horizontal Tab
\n\u000aNewline
\f\u000cFormfeed
\r\u000dCarriage return
\'\u0027Apostrophe-quote
\"\u0022Double Quotation
\\\u005cBackslash

Example :

class Test
{
 public static void main(String []arg)
  {
   System.out.print("C Prowess");
   System.out.print("\tC++ Prowess");
   System.out.print("\nJava Prowess");
  }
}          
OUTPUT:
C Prowess        C++ Prowess
Java Prowess

Next topic is Operators




 

Training For College Campus

We offers college campus training for all streams like CS, IT, ECE, Mechanical, Civil etc. on different technologies like
C, C++, Data Structure, Core Java, Advance Java, Struts Framework, Hibernate, Python, Android, Big-Data, Ebedded & Robotics etc.

Please mail your requirement at info@prowessapps.in


Projects For Students

Students can contact us for their projects on different technologies Core Java, Advance Java, Android etc.

Students can mail requirement at info@prowessapps.in



CONTACT DETAILS

info@prowessapps.in
(8AM to 10PM):

+91-8527238801 , +91-9451396824

© 2017, prowessapps.in, All rights reserved