java - What is that ('Z' - 'A') -


in currency.java file there line.

    private static final int a_to_z = ('z' - 'a') + 1; 

what means this? didn't see before. a_to_z's value , why using 'z' instead number.

with expression treating chars ints, using character's unicode value instead of character itself.

'z' - 'a' + 1 

will become

90 - 65 + 1 (=26) 

Comments