study guides for every class

that actually explain what's on your next test

Else statement

from class:

AP Computer Science Principles

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.

© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.