Return to Unit Menu | | | Terms of Use  |

Escape Sequences

The following is a table of escape sequences to be used when printing in Java.
These statements are embedded within a literal print remark (they go between the quotes):

New line
Moves to beginning of next line
Backs up one character
Horizontal tab
Moves to next tab position
Tab spacing is every 8 columns starting with 1.
(Columns 9, 17, 25, 33, 41, 49, 57, 65, 73 ...)
Displays an actual backslash
Single quote
Displays an actual single quote
Double quote
Displays an actual double quote


will tab, print George, tab twice more, and print Paul.

George                Paul

Return to Unit Menu | | | Terms of Use  |

Notice: These materials are free for your on-line use at this site, but are not free for the taking.
Please do not copy these materials or re-post them to the Internet, as it is copyright infringement.
If you wish hardcopies of these materials, refer to our subscription area,
Help us keep these resources free. Thank you.