while Loops

AP Computer Science A· difficulty 3/5

<code>while (true) { ... break; ... }</code> is

  • A

    Loops until break is reached

    check_circle
  • B

    Runs once

  • C

    Always infinite

  • D

    Compile error

Explanation

Common pattern: break exits eventually.

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

Related questions