Written by the Fiveable Content Team • Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 exam•Written by the Fiveable Content Team • Last updated September 2025
Definition
A Boolean value is a data type that can only have two possible values: true or false. It is often used in programming to make decisions and control the flow of a program.
Related terms
Relational operators: These are symbols used to compare two values and return a Boolean value based on the comparison. For example, the greater than operator (>), which returns true if the left operand is greater than the right operand.
Logical operators: These are symbols used to combine multiple Boolean values and return a new Boolean value. Examples include the AND operator (&&), which returns true if both operands are true, and the OR operator (||), which returns true if at least one operand is true.
Conditional statements: These are programming constructs that use Boolean values to make decisions. They allow different blocks of code to be executed based on whether certain conditions are true or false.