Using this tutorial

This tutorial 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 tutorial 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 tutorial 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 tutorial.

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