Back To Java Loops Index
//program to display numbers 0 to 10 with a gap of 2 between the numbers using for statement public class forloop0to10gap2 { public static void main(String[] args) { int i; for(i=0;i<=10;i+=2) { System.out.println(i); } } }