?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Moderate

Missing Loop Conditions

APCSA-GVLMKU

To produce the output 2 4 6 8 10, what is the loop condition for the following loop?

 int n = 0;
 while(_______________)
 {
  n = n + 2;
  System.out.print(n + " ");
 }
A

n <= 10

B

n < 10

C

n < 8

D

n >= 2

E

n > 8