UNPKG

epubjs

Version:

Render ePub documents in the browser, across many devices

21 lines (20 loc) 3.66 kB
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><title>Conventions Used in This Book</title><link rel="stylesheet" href="core.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"/></head><body><div class="sect1" title="Conventions Used in This Book"><div class="titlepage"><div><div><h1 class="title"><a id="learnjava3-PREFACE-2-SECT-4"/>Conventions Used in This Book</h1></div></div></div><p><a id="idx10001" class="indexterm"/>The font conventions used in this book are quite simple.</p><p><span class="emphasis"><em>Italic</em></span> is used for:</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>Unix pathnames, filenames, and program names</p></li><li class="listitem"><p>Internet addresses, such as domain names and URLs</p></li><li class="listitem"><p>New terms where they are defined</p></li><li class="listitem"><p>Program names, compilers, interpreters, utilities, and commands</p></li><li class="listitem"><p>Threads</p></li></ul></div><p><code class="literal">Constant width</code> is used for:</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>Anything that might appear in a Java program, including method names, variable names, and class names</p></li><li class="listitem"><p>Tags that might appear in an HTML or XML document</p></li><li class="listitem"><p>Keywords, objects, and environment variables</p></li></ul></div><p><strong class="userinput"><code>Constant width bold</code></strong> is used for:</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>Text that is typed by the user on the command line</p></li></ul></div><p><em class="replaceable"><code>Constant width italic</code></em> is used for:</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>Replaceable items in code</p></li></ul></div><div class="tip" title="Tip"><h3 class="title"><a id="learnjava3-PREFACE-2-NOTE-1"/>Tip</h3><p>This icon designates a note, which is an important aside to the nearby text.</p></div><div class="warning" title="Warning"><h3 class="title"><a id="learnjava3-PREFACE-2-NOTE-2"/>Warning</h3><p>This icon designates a warning relating to the nearby text.</p></div><p>In the main body of text, we always use a pair of empty parentheses after a method name to distinguish methods from variables and other creatures.</p><p>In the Java source listings, we follow the coding conventions most frequently used in the Java community. Class names begin with capital letters; variable and method names begin with lowercase. All the letters in the names of constants are capitalized. We don’t use underscores to separate words in a long name; following common practice, we capitalize individual words (after the first) and run the words together. For example: <code class="literal">thisIsAVariable</code>, <code class="literal">thisIsAMethod()</code>, <code class="literal">ThisIsAClass</code>, and <code class="literal">THISISACONSTANT</code>. Also, note that we differentiate between static and nonstatic methods when we refer to them. Unlike some books, we never write <code class="literal">Foo.bar()</code> to mean the <code class="literal">bar()</code> method of <code class="literal">Foo</code> unless <code class="literal">bar()</code> is a static method (paralleling the Java syntax in that case).<a id="I_indexterm_id557489" class="indexterm"/></p></div></body></html>