Back To Java Loops Index
//program to print numbers from 1 to 10 with a gap of 2 numbers using while statement public class whileloop1to10gap2 { public static void main(String[] args) { int i; i=1; while(i<=10) { System.out.println(i); i=i+2; } } }