how to check for space character in java code example Example: check if a char is a space java if (c == ' ')