NoCharEscape
DRAFT

Misconception:

A \ in a char or String literal has no special meaning; it is no different than X or + or any other character.

Incorrect

\ is a normal character in char and String literals

Correct

\ is an escape character in char and String literals

Correction
Here is what's right.

No. The backslash (\) starts an escape sequence. There must be something following the \ (e.g., like \n or \\ or \"), and the \ itself is not part of the content of the literal.

Language

Java

Concepts

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.