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
76 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 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,050 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 in Java by Sirajul
• 25,180 points
60 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
26 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
315 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 in Java by Sirajul
• 25,180 points
131 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
512 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,380 points

edited Nov 6, 2018 by Omkar 7,996 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,090 points
1,958 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,090 points
5,104 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
87 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
72 views