Representing letters as numbers in java -
i wondering how represent letters integers in java. working on problem have find mid letter between 2 lettered word. example, take word 'go' , provide each letter assigned integer value find midpoint letter. can help me out or point me in right direction go solving on how midpoint letter between 2 letter word?
that simple
int = 'a'; int c = 'c'; char mid = (char) ((a + c) / 2); system.out.println(mid);
prints
b
java numbers alphabet
No comments:
Post a Comment