The following ones are valid too... char uni = '\u0065'; char hex = 0x65; char oct = 056; but char lf = '\u000a'; is not valid because this is actually a linefeed which is translated as a real linefeed in a very early stage during the parsing and the line ends up looking like char lf = ' '; which is clearly not a valid Java statement.
I am not sure if I exactly got what u are asking. But if u want to know what kind of values char datatype can hold... Here are some, char c; Acceptable Values : Character Literals,Integer Literals which are within the range of values a char can hold c='a'; c=0; c=65535; c=07; c=0x07; c='\u0061'; char c\u0061='\u0061'; Not acceptable: c=-1; out of range for char c=65536; out of range for char
Joined: Nov 14, 2000
Thanks, That's exactly the type of info I was looking for. - Mike