While loop in Java while (condition) { // code block to be executed } Example while (i < 10) { text += "The number is " + i; i++; }