CHAPTER 3: Lexical Structure Previous
Previous
Java Language
Java Language
Index
Index
Next
Next

Lexical Structure

This chapter specifies the lexical structure of Java.

Java programs are written in Unicode (S3.1), but lexical translations are provided (S3.2) so that Unicode escapes (S3.3) can be used to include any Unicode character using only ASCII characters. Line terminators are defined (S3.4) to support the different conventions of existing host systems while maintaining consistent line numbers.

The Unicode characters resulting from the lexical translations are reduced to a sequence of input elements (S3.5), which are white space (S3.6), comments (S3.7), and tokens. The tokens are the identifiers (S3.8), keywords (S3.9), literals (S3.10), separators (S3.11), and operators (S3.12) of the Java syntactic grammar.

© 1996 Sun Microsystems, Inc. All rights reserved.