// determine whether a character is alphabet private (static) boolean isAlphabet(char c) { return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); }