Chapter 9 Section 1 "Characters" - data type char reperesents a single character - write character constants as symbols enclosed in single quotes - internally, characters are encoded as an arbitrary combination of 1s and 0s - ASCII - American Standard Code for Information Interchange - widely used character coding scheme - not all characters are printable - 128 total characters - requires 7 bits for representation - 1 byte is actually used - 128 leftover codes are generally used for manufacturer-specific non-standard symbols - sufficient for common English, but not for many other languages - Unicode - full name is Unicode Worldwise Character Standard - established by the Unicode Consortium - 34,168 distinct characters - sufficient for non-English languages - 2 bytes per character - same as ASCII codes where overlap - used by Java for char data type - to use Unicode for IO, the OS and development tool must be able to handle it - declaration - char = ; - casting a character to an integer returns the ASCII code - casting an integer to a char shows the char associated with a given ASCII code, assuming the int is between 0 and 127 - compare characters as you would numbers - relative value determined by relative value of ASCII code - capital letters sort before lower case - within a case, letters sort alphabetically Quick Check 1. a. A b. 67 c. Y d. ? 2. 256