What is escape characters in Java? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

What is escape characters in Java?

Explain with an example.

11th Feb 2019, 4:04 AM
Nitin Gutte
Nitin Gutte - avatar
1 Answer
+ 7
"n" on its own means nothing if we use the escape charactor ➡"\" and place ➡ "n" next to it ➡ "\n" this is an escape sequence the character following the backslash is parsed as it is in that location using its special meaning in this example a newline.
11th Feb 2019, 9:40 AM
D_Stark - avatar