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. SEQ | UNICODE | DESCRIPTION |
---|---|---|
\b | \u0008 | Backspace |
\t | \u0009 | Horizontal Tab |
\n | \u000a | Newline |
\f | \u000c | Formfeed |
\r | \u000d | Carriage return |
\' | \u0027 | Apostrophe-quote |
\" | \u0022 | Double Quotation |
\\ | \u005c | Backslash |
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