Java Reference
In-Depth Information
1.5. Unicode Characters
Suppose we were defining a class that dealt with circles and we wanted
a named constant that represented the value p . In most programming
languages we would name the constant "pi" because in most languages
identifiers (the technical term for names) are limited to the letters and
digits available in the ASCII character set. In the Java programming lan-
guage, however, we can do this:
class Circle {
static final double p = 3.14159265358979323846;
// ...
}
The Java programming language moves you toward the world of interna-
tionalized software: you write code in Unicode, an international character
set standard. Unicode basic [1] characters are 16 bits, and together with
the supplemental characters (21 bits) provide a character range large
enough to write the major languages used in the world. That is why we
can use p for the name of the constant in the example. p is a valid letter
from the Greek section of Unicode and is therefore valid in source. Most
existing code is typed in ASCII , a 7-bit character standard, or ISO Latin-1,
an 8-bit character standard commonly called Latin-1. But these charac-
ters are translated into Unicode before processing, so the character set
is always Unicode.
[1] Basic Multilingual Plane, or BMP , in Unicode terminology.
 
 
Search WWH ::




Custom Search