The boolean data type represents true/false or yes/no values. The character 'Y' is used for true/yes, and the character 'N' is used for false/no.
boolean could be considered as a subtype of the char datatype, since it follows the same rules, only with additional restrictions on the character. However, it is considered as a primitive in its own right.
Example | Valid | Notes |
---|---|---|
Y | ||
N | ||
y | Should be uppercase | |
n | Should be uppercase | |
true | More than one character | |
t | Not Y or N |