Character Variables

A feature of Java that makes it unique is its built-in support for internationalization (see Chapter 24, "Using Internationalization" ). A key component of this support is the storage of characters as 16-bit values rather than a typical 8-bit representation. The char primitive type holds a 16-bit Unicode character. The Unicode standard allows the use of languages with alphabets that cannot be represented with only 256 characters. Although different from what you might be accustomed to, Java's representation of characters is transparent to you as a programmer. As a convenience, char variables that represent the Latin alphabet, numerals, and punctuation symbols have the same values as the ASCII character set (these characters ...

Get Special Edition Using Java 2 Standard Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.