private static boolean isHexDigit(char c){
  return (c >= '0' && c <= '9' || c >= 'a' && c <= 'f' || c >= 'A' && c <= 'F');
}

private static boolean isHexDigit ( char c ) { return ( c >= '0' && c <= '9' || c >= 'a' && c <= 'f' || c >= 'A' && c <= 'F' ) ; }
returns true if the given character is a valid hex character .
