how to check if a string is only letters and space in java code example Example: check if a char is a space java if (c == ' ')