?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Moderate

While Loops

APCSA-KGLV8X

What is the output of the following code fragment?

 int limit = 8;
 System.out.print("H");
 int loopcount = 10;
 while (loopcount <= limit)
 {
  System.out.print("E");
  loopcount++;
 }

 System.out.print("LLO");
A

HELLO

B

HEELLO

C

HLLO

D

HEEELLO

E

H