Example: this Java program will print "Hello World" 4 times:
public class While { public static void main(String[] args) { int i; i = 0; while ( i < 4 ) { System.out.println("Hello World"); i++; } } }
DEMO: demo/05-loops/01-intro/While.java (step in BlueJ)
Each type of loop statement is designed for some special situation (problem)