Italic is used for:
- Pathnames, filenames, and program names.
- New terms where they are defined.
- Internet addresses, such as domain names and URLs.
Boldface is used for:
- Particular keys on a computer keyboard.
- Names of user interface buttons and menus.
Constant Width is used for:
- Anything that appears literally in a Java program, including keywords,
data types, constants, method names, variables, class names, and
interface names.
- Command lines and options that should be typed verbatim on the
screen.
- All Java code listings.
- HTML documents, tags, and attributes.
- Method parameters, and general placeholders that indicate that an item
is replaced by some actual value in your own program.
- Variable expressions in command-line options.
- Java class synopses in the quick-reference section. This very narrow
font allows us to fit a lot of information on the page
without a lot of distracting line breaks.
- Highlighting class, method, field, and constructor names in the
quick-reference section, which makes it easier to scan the
class synopses.
- Method parameter names and comments in the quick-reference section.