Java source code consists of words or symbols called lexical elements or tokens. Java lexical elements include line terminators, whitespace, comments, keywords, identifiers, separators, operators, and literals. The words or symbols in the Java programming language are comprised of the Unicode character set.
Maintained by the Unicode Consortium standards organization, Unicode is the universal character set with the first 128 characters being the same as those in the American Standard Code for Information Interchange (ASCII) character set. Unicode provides a unique number for every character, usable across all platforms, programs, and languages. Java SE 7 uses Unicode 6.0.0 and you can find more about it in the online manual. Java SE 6 and J2SE 5.0 use Unicode 4.0.
Java comments, identifiers, and string literals are not limited to ASCII characters. All other Java input elements are formed from ASCII characters.
The Unicode set version used by a specified version of the Java
platform is documented in the
class of the Java API. The Unicode Character Code Chart for scripts,
symbols, and punctuation can be accessed at http://unicode.org/charts/.
ASCII reserves code 32 (spaces) and codes 33 to 126 (letters, digits, punctuation marks, and a few others) for printable characters. Table 2-1 contains the decimal values followed by the corresponding ASCII characters for these codes.