Escape Characters in Java

0 votes

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

Jun 20, 2018 in Java by misc.edu04
• 1,450 points
740 views

2 answers to this question.

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 20, 2018 by code.reaper12
• 3,500 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,120 points

Related Questions In Java

0 votes
2 answers

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

There are two approaches to this: for(int i ...READ MORE

answered Aug 19, 2019 in Java by Sirajul
• 59,230 points
1,501 views
0 votes
1 answer

Number of Characters in Java String

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

answered Oct 23, 2018 in Java by anto.trigg4
• 3,440 points
338 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,220 points
3,174 views
0 votes
2 answers

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

 Here are two ways illustrating this: Integer x ...READ MORE

answered Aug 20, 2019 in Java by Sirajul
• 59,230 points
1,916 views
0 votes
1 answer

Escaping strings in JSON

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

answered Oct 4, 2018 in Java by geek.erkami
• 2,680 points
23,808 views
+5 votes
4 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,450 points

edited Nov 7, 2018 by Omkar 79,514 views
+1 vote
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,500 points
7,954 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,500 points
16,987 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,500 points
4,277 views
0 votes
1 answer

Need for finalize() in Java

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

answered May 9, 2018 in Java by code.reaper12
• 3,500 points
522 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP