Conditional
In a conditional statement or expression the value of a condition determines which alternative pieces of code to execute.
Related concepts: StatementExpressionControl Flow
Closest Wikipedia entry: Conditional (computer programming)
Misconceptions about Conditional21 documented Misconceptions
Check YourselfBaseCaseNotNeeded
Recursive computations do not necessarily need a base case
ConditionalIsSequence
If-else is equivalent to sequence of two ifs
ElsIf
There is an elsif keyword for multi-way conditional statements
ElseAlwaysExecutes
The else branch of an if-else statement always executes
ForIsConditional
The body of a for statement executes at most once
IfIsLoop
The body of an if statement executes repeatedly, as long as the condition holds
IfRequiresElse
Every if statement requires an else
LoopTerminatingCondition
For and while loops end when the condition becomes true
MapToBooleanWithConditionalOperator
To map a boolean expression to a boolean, a conditional operator is necessary
MapToBooleanWithIf
To map a boolean expression to a boolean, an if statement is necessary
RecursiveMethodNeedsIfElse
A recursive method needs to contain an if-else statement