Boolean Expressions

AP Computer Science A· difficulty 4/5

<code>'a' < 'b'</code> evaluates to

  • A

    Throws exception

  • B

    true

    check_circle
  • C

    Compile error

  • D

    false

Explanation

char compared by Unicode value; 'a'=97, 'b'=98 → true.

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

Related questions