The variable A is charactually stored in memory as a numeric value. This number is a specific symbol ( a, b, é, ...) in accordance with a particular codification (typically ASCII Table ).
For example:
Decimal Char
----------------
65 A
66 B
... ...
char, . , char. , char.
int result = 100 - 'A';
System.out.println ("100 - A is " + result);
System.out.println("ASCII code for 65: " + (char)65);
.
, JLS, 5.6 0,2. 5.1.2. :
19 :
- ...
- char int, long, float double
- ...