Escape Characters in Java

0 votes

Can someone give me the complete list of escape characters available in Java?

Jun 19, 2018 in Java by misc.edu04
• 1,380 points
62 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Below is the list of all the escape characters in Java:
 

\b --> Insert a backspace in the text at this point.

\f --> Insert a form feed in the text at this point.

\n --> Insert a newline in the text at this point.

\r --> Insert a carriage return in the text at this point.

\t --> Insert a tab in the text at this point.

\' --> Insert a single quote character in the text at this point.

\" --> Insert a double quote character in the text at this point.

\\ --> Insert a backslash character in the text at this point.

answered Jun 19, 2018 by code.reaper12
• 3,450 points
0 votes

These are escape characters which are used to manipulate string.

\t  Insert a tab in the text at this point
\b  Insert a backspace in the text at this point
\n  Insert a newline in the text at this point
\r  Insert a carriage return in the text at this point
\f  Insert a form feed in the text at this point
\'  Insert a single quote character in the text at this point
\"  Insert a double quote character in the text at this point
\\  Insert a backslash character in the text at this point
answered Oct 15, 2018 by Daisy
• 8,020 points

Related Questions In Java

0 votes
1 answer

What is the easiest way to iterate through the characters of a string in Java?

The below code seems the easiest to ...READ MORE

answered Jul 13, 2018 in Java by scarlett
• 1,280 points
28 views
0 votes
1 answer

Number of Characters in Java String

I think you can make use of ...READ MORE

answered Oct 22, 2018 in Java by anto.trigg4
• 3,420 points
18 views
+1 vote
3 answers

What is the syntax to declare and initialize an array in java?

You can use this method: String[] strs = ...READ MORE

answered Jul 25, 2018 in Java by samarth295
• 2,190 points
102 views
0 votes
1 answer

How can I convert a String variable to a primitive int in Java

You can convert a String to int by using a function: int ...READ MORE

answered Apr 12, 2018 in Java by sharth
• 3,310 points
45 views
0 votes
1 answer

Escaping strings in JSON

You can find a JSON library in your ...READ MORE

answered Oct 3, 2018 in Java by geek.erkami
• 2,320 points
190 views
+5 votes
3 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

answered Mar 27, 2018 in Java by DragonLord999
• 8,360 points

edited Nov 6, 2018 by Omkar 4,610 views
0 votes
1 answer

How to handle drop downs using Selenium WebDriver in Java

First, find an XPath which will return ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,030 points
1,232 views
0 votes
1 answer

What are the differences between getText() and getAttribute() functions in Selenium WebDriver?

See, both are used to retrieve something ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,030 points
3,519 views
0 votes
1 answer

Purpose of “String args[]” in the “psvm” of Java

Let me give you the complete explanation ...READ MORE

answered May 7, 2018 in Java by code.reaper12
• 3,450 points
58 views
0 votes
1 answer

Need for finalize() in Java

finalize() is a method called by the ...READ MORE

answered May 8, 2018 in Java by code.reaper12
• 3,450 points
54 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.