Home Segments Top Top Previous Next

70: Mainline

The char data type ordinarily is used for storing characters; however, because character codes can be viewed as integers, char also is viewed as one of the integral data types, as are byte, short, int, and long. Java uses 2 bytes for the char data type, so as to accommodate the characters in not only English, but also many of the world's other languages, such as Bengali, Kannada, and Telugu.