public int charDistance(char a,char b){
  return Math.abs(Character.getNumericValue(a) - Character.getNumericValue(b));
}

public int charDistance ( char a , char b ) { return Math . abs ( Character . getNumericValue ( a ) - Character . getNumericValue ( b ) ) ; }
compute the distance between the two chars based on the ascii symbol codes .
