?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Moderate

Loop Conditions

APCSA-8EGOEM

Consider the following code segment.

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

 System.out.println("LLO");

What is printed as a result of executing the code segment?

A

HELLO

B

HEELLO

C

HLLO

D

HEEELLO

E

HEEEELLO