ICSE Class 10 Computer Applications Question 2 of 25

Values and Data Types — Question 2

Back to all questions
2
Question

Question 2

What are escape sequences in Java? Give three examples.

Answer

An escape sequence is a set of characters that has a special meaning to the Java compiler. In the escape sequence, a character is preceded by a backslash (\). Some examples of escape sequences are \n, \' and \t.