Site hosted by Build your free website today!
Inheritance Uses Relationship While Loop JOptionPane

While Loop

A While Loop executes a group of statements, as long as a given condition is true. So basically, a while loop continues doing an action until some condition stops it. You use a while loop when you don't know ahead of time how many items you have to process. You can also use while loops to shorten code and make it easier for the programmer.

Here is a program that I wrote that contains a while loop:

click here to go home: