Bool
Boolean
booleans can hold the values true
and false
that is all.
A great practice for boolean variables would be to name them something beginning with the word is like isTall
the answer to their question is true
or false
. This makes code easier to understand.
bool isLarge = true;
bool isNeg = false;