SamMan said:
Sorry... I should have said ASCII value. As in the Dec, Hx or Oct value of,
say #.
Again, that sounds like you are not using the term correctly.
Let's try two different expansions:
A)
how would you either display, or check for a value by using a 7-bit
value ranging from 0 through 127 that is only mainly good for US
English, Hawaiian, Swahili and Latin value?
B)
how would you either display, or check for a value by using the numeric
value of some character?
I think the latter is what you mean.
Remember, MS Windows does not do "ASCII". It does "ANSI". Java does not
use ASCII, it uses Unicode, which has 16-bit unsigned values ranging
from 0 through 65536.
There is no ASCII value for 'ñ', nor for 'µ', '±', 'ß', '£', '¥', '¢'...
However, there are Latin-1 values, Unicode values, Cp1252 values and
MacRoman values for all of those.
Now, if you mean "numerical value" and not "ASCII", then it's simple.
Java characters are 16-bit unsigned integers.
int i = 'A';
char c = 65;
char c2 = 'A'
if ( 'A' == i )
....