Conventions Used in This Book
Body text is Times Roman, normal, like you’re reading now.
A Constant width font is used for:
Code examples and fragments
Keywords, operators, data types, variable names, class names, and interface names that might appear in a Java program
Program output
Tags that might appear in an HTML document
A bold constant width is used for:
Command lines and options that should be typed verbatim on the screen
An italicized constant width font is used
for:
Replaceable or variable code fragments
An italicized font is used for:
New terms where they are defined
Pathnames, filenames, and program names. (However, if the program name is also the name of a Java class, it is given in a monospaced font, like other class names.)
Host and domain names (java.oreilly.com)
Titles of other books (Java I/O)
Significant code fragments and complete programs are generally placed in a separate paragraph like this:
Socket s = new Socket("java.oreilly.com", 80);
if (!s.getTcpNoDelay( )) s.setTcpNoDelay(true);When code is presented as fragments rather than complete programs,
the existence of the appropriate import statements
should be inferred. For example, in the previous code fragment you
may assume that java.net.Socket was imported.
Some examples intermix user input with program output. In these cases, the user input will be displayed in bold, as in this example from Chapter 10:
%telnet localhost 7Trying 127.0.0.1... Connected to localhost. Escape character is '^]'.This is a testThis is a test ...