Compound Boolean Expressions

AP Computer Science A· difficulty 4/5

<code>!a && b</code> parses as

  • A

    (!a) && b

    check_circle
  • B

    Compile error

  • C

    !(a && b)

  • D

    !(a) || b

Explanation

<code>!</code> is unary, highest precedence among the three logical ops.

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

Related questions