for Loops

AP Computer Science A· difficulty 3/5

Output of:

<code>for (int i = 5; i > 0; i--) System.out.print(i); </code></pre>

  • A

    Infinite

  • B

    5432

  • C

    12345

  • D

    54321

    check_circle

Explanation

i: 5, 4, 3, 2, 1.

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

Related questions