
Constants/Literal Constants 3.3
3.2.3 Character Constants
Character constants can be declared based on the character set followed in a computer. ANSI
have standardized these values as shown below.
A 65 a 097 NULL 000
B 66 b 098 LF(line feed) 010
Z 90 z 122 CR(carriage return) 013
In addition, Java allows Unicode characters like ISO Latin for example: \u0042,\u0043 etc. for
Latin character set a, b, etc. A character constant contains a single character enclosed within a
pair of single quote marks. Examples of character constants are: ‘5’ ‘X’ ‘;’ ‘ ‘
Note that the character constant ‘5’ is not the same as the number 5. The last ...