Explain when it would be appropriate to write an indefinite loop.

What will be an ideal response?


Often, the value of a loop control variable is not altered by arithmetic, but instead is altered by user input. For example, perhaps you want to continue performing some task while the user indicates a desire to continue. In that case, you do not know when you write the program whether the loop will be executed two times, 200 times, or not at all. This type of loop is an indefinite loop.

Computer Science & Information Technology

You might also like to view...

To run the Painter application, we used the java command, followed by the name of the application’s .class file (in this case, Painter.

a. .java b. .class c. .exe d. .obj

Computer Science & Information Technology

A(n) _________________________ is a neutral zone between the private LAN and the public network of an organization.

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

Computer Science & Information Technology

Content providers are the only way to share data between apps.

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

Computer Science & Information Technology

Sequential numbering from the AutoNumber data type is an example of a(n) ________ key

A) candidate B) concatenated C) artificial D) surrogate

Computer Science & Information Technology