while Loops

AP Computer Science A· difficulty 3/5

<code>break</code> inside a loop

  • A

    Throws exception

  • B

    Goes to top of loop

  • C

    Exits the (innermost) loop entirely

    check_circle
  • D

    Skips to next iteration

Explanation

<code>break</code> exits the immediately enclosing loop.

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

Related questions