What is wrong with the following while statement?

```
1 while (z >= 0) {
2 sum += z;
3 }
```


The value of the variable z is never changed in the while statement. Therefore, if the loop-continuation condition (z >= 0) is true, an infinite loop is created. To prevent an infinite loop from occurring, z must be decremented so that it eventually becomes less than 0.

Computer Science & Information Technology

You might also like to view...

For Maps, a BiConsumer’s first parameter represents the _________ and its second rep- resents the corresponding __________ .

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Which of the following is true?

a. An app's images and CSS files can be placed in any folder of the app. b. An app's images and CSS files are placed in the app's resources folder within the Web Pages node. c. An app's images and CSS files are placed in the subfolders of the app's resources folder within the Web Pages node. d. None of the above.

Computer Science & Information Technology

Panels and panel groups appear on the right side of the screen by default, but you can move them and use them as "floating panels."

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The Clear command, located in the Table Style gallery, can be used to remove a table style.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology