Java Reference
In-Depth Information
Note: Escaping Characters
The backslash is used to escape special characters in strings such as:
• single quote marks
\'
• double quote marks
\"
• end of line
\n
• carriage return
\r
• tab
\t
If you want to actually write a backslash, you need to escape it with another
backslash:
"This is a backslash \\"
<< "This is a backslash \"