3.5

Compound Booleans

AP Computer Science A

The three logical operators

AND operator (&&)

AND truth table

OR operator (||)

OR truth table

NOT operator (!)

NOT truth table

Short-circuit evaluation

AND short-circuits on false

OR short-circuits on true

Combining operators

Operator precedence

Range checking

Tracing compound expressions

Complete example: Amusement park ride

AP Exam Tips

Common Mistakes

Key Vocabulary