⌨️ap computer science principles review

Else statement

Written by the Fiveable Content Team • Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examWritten by the Fiveable Content Team • Last updated September 2025

Definition

An else statement is an optional part of an if statement that specifies what code should be executed when the condition in the if statement is false.

"Else statement" also found in: