[Preface] Using This Book

#

| Preface |

## Using This Book

This book is not meant to be read from cover to cover. Instead, it is meant to be used as a reference manual for the syntax and lexical structure of the Java language. The language is presented in a bottom-up order. The text starts with lexical analysis and works up through data types, expressions, declarations, statements, and overall program structure. The book also covers threads and exception handling in detail. The final chapter presents reference information on the classes in the `java.lang` package, since these classes are essential to the Java language.

When you need to know the details about a particular Java construct, you can find the appropriate section and read everything you need to know about that aspect of the language. For every construct, there is a railroad diagram that presents its syntax in an easy-to-understand, visual fashion. The text also provides many examples to illustrate subtle features of the language.

The book includes numerous cross-references to help you move quickly between related topics. A cross-reference shown in italic type specifies the location of a railroad diagram related to the current diagram, while cross-references in plain text specify other sections of the book.

The Java Language Reference is broken down into ten chapters and an appendix as follows:

Chapter 1

  Introduction provides a quick introduction to the Java programming language by way of a "Hello World" example. The chapter also describes the notational conventions of the railroad diagrams that are used to define the syntax and lexical structure of the Java language.

Chapter 2

  Lexical Analysis describes the process by which the Java compiler reads the characters in a Java source file and looks for sequences that form identifiers, keywords, literals, and operators.

Chapter 3

  Data Types discusses all of the different data types provided by the Java language.

Chapter 4

  Expressions presents the syntax of Java expressions and describes the function of each operator in the language.

Chapter 5

  Declarations covers the syntax of class, interface, method, and variable declarations. The chapter also provides a detailed look at the object-oriented aspects of the Java language.

Chapter 6

  Statements and Control Structures describes each of the available statements in Java.

Chapter 7

  Program Structure presents the syntax of Java compilation units and also covers the two common types of Java programs: stand-alone applications and applets.

Chapter 8

  Threads discusses how to create and control threads in a Java program, as well as how to synchronize multiple threads.

Chapter 9

  Exception Handling describes how to generate, declare, and handle exceptions in Java. The chapter also covers the hierarchy of exception classes provided in the `java.lang` package.

Chapter 10

  The java.lang Package provides reference information on each of the classes in `java.lang`.

Appendix

  The Unicode 2.0 Character Set lists the character sets that comprise the Unicode standard.

Audience |  | Related Books