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

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -