Boolean
A Boolean value is a truth value and can be used as a condition.
Related concepts: ValueTypeConditional
Closest Wikipedia entry: Boolean data type
Misconceptions about Boolean13 documented Misconceptions
Check YourselfComparisonWithBooleanLiteral — Java
To test whether an expression is true or false, one must compare it to true or to false
MapToBooleanWithConditionalOperator — Java
To map a boolean expression to a boolean, a conditional operator is necessary
MapToBooleanWithIf — Java
To map a boolean expression to a boolean, an if statement is necessary
NoShortCircuit — Java
&& and || always evaluate both operands
NoSingleLogicAnd — Java
& is only a bitwise AND
NumericToBooleanCoercion — Java
Numeric types can be coerced to boolean
ReferenceToBooleanCoercion — Java
Every reference type can be coerced to boolean
ComparisonWithBoolLiteral — Python
To test whether an expression is True or False, one must compare it to True or to False
MapToBooleanWithIf — Python
To map a boolean expression to a bool, an if statement is necessary
MapToBooleanWithTernaryOperator — Python
To map a boolean expression to a bool, a ternary conditional operator is necessary
NoShortCircuit — Python
and/or always evaluate both operands
NoSingleLogicAnd — Python
& is only a bitwise AND
CompareBooleanToConstant — Scratch
To test whether an expression evaluates to true or false, one must compare it to a constant