How to use Counter Controlled While Loop
The following Java program uses Counter Controlled While Loops. Suppose you know exactly how many times certain statements need to be executed. In such cases, while loops assumes the form of a counter-controlled while loops. Suppose that a set of statements need to be executed N times. You can set up a counter to track how many items have been read. .