====== while ===== while (condition) { //command } a while loop do something while a condition ===== example of while loop in java ===== package codereferececomjava; public class CodeRefereceComJava { public static void main(String[] args) { int i=4; while(i==4) { i++; } System.out.println("i is :" + i ); } } === output of while === i is :5