Analyze the following code.

int count = 0;
while (count < 100) {
// Point A
System.out.println("Welcome to Java!");
count++;
// Point B
}

// Point C
a. count < 100 is always true at Point A
b. count < 100 is always true at Point B
c. count < 100 is always false at Point B
d. count < 100 is always true at Point C
e. count < 100 is always false at Point C

ae The count is initialized to 0 before the loop. The loop is executed 100 times for count from 0 to 99 . Inside the loop body, at Point A, count < 100 is true. After executing count++, count < 100 in Point B may become false. After the loop is exited, count < 100 is false at Point C. So, the correct answer is AE.

Computer Science & Information Technology

You might also like to view...

Hold down ________ while clicking other controls to make adjustments to all of them at the same time

Fill in the blank(s) with correct word

Computer Science & Information Technology

You can disable the default underlining of hypertext links by setting the CSS text-decoration property to a value of ____.

A. no-underline B. no-default C. none D. disable

Computer Science & Information Technology