Write a Java program to show the use of escape sequences.
Please answer the questions
It's my Exam
I will mark brainiest whoever answers this first
Answers
Answered by
3
Explanation:
Escape Sequences in Java
A character with a backslash (\) just before it is an escape sequence or escape character. We use escape characters to perform some specific task. The total number of escape sequences or escape characters in Java is 8. Each escape character is a valid character literal.
The list of Java escape sequences:
Why will we need Escape sequence?
Suppose we would like to run the subsequent java code:
public class Test {
public static void main(String[] args)
{
System.out.println("Hi geek, welcome to " GeeksforGeeks ".");
}
}
Similar questions