1(vi)
Which of the following is an escape sequence character in Java?
- (a)
/n - (b)
\t - (c)
/t - (d)
//n
Show SolutionHide Solution↓
\t
Reason — In Java, an escape sequence is a combination of characters starting with a backslash (\) followed by a specific character that performs a special operation.
Analysing the given options:
/n– Incorrect, should be\n(Backslash is required).\t– Correct, it represents a tab./t– Incorrect, should be\t.//n– Incorrect, this is not an escape sequence;//is used for comments in Java.