Java Reference
In-Depth Information
Ask the Expert
Q :
Why does Java use Unicode?
A : Java was designed for worldwide use. Thus, it needs to use a character set that can
represent all the world's languages. Unicode is the standard character set designed
expressly for this purpose. Of course, the use of Unicode is inefficient for languages
such as English, German, Spanish, or French, whose characters can be contained
within 8 bits. But such is the price that must be paid for global portability.
The Boolean Type
The boolean type represents true/false values. Java defines the values true and false using
the reserved words true and false . Thus, a variable or expression of type boolean will be
one of these two values.
Here is a program that demonstrates the boolean type:
Search WWH ::




Custom Search