- while
Java while-loop
examples/java/WhileLoop.java
public class WhileLoop { public static void main(String[] args) { int i = 1; while (i <= 10) { System.out.println(i); i++; } } }
public class WhileLoop { public static void main(String[] args) { int i = 1; while (i <= 10) { System.out.println(i); i++; } } }