Compound Boolean Expressions

AP Computer Science A· difficulty 4/5

<code>(true || compute())</code> calls compute()

  • A

    Once

  • B

    Never (short-circuit)

    check_circle
  • C

    Always

  • D

    Maybe

Explanation

<code>||</code> short-circuits when left is true.

Want 10 more like this — adaptive to your weak spots?

Related questions