An escape sequence inserts a special character into
a println statement.
| Sequence | Special character |
|---|---|
\n | new-line (goes to the next line) |
\t | tab (indents output by roughly 8 spaces) |
\" | quotation mark |
\\ | backslash |
Example:
System.out.println("I said \"hello\" to Fred.");