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