java for loop increment by 2 code example
Example 1: how to make a for loop increment by 2 in java
for(j = 0; j<=90; j+2){}
Example 2: java for increment by 2
int n = 2; //Or any other number
for (int i=0; i < 10; i+=n){
System.out.println(i) //This will print 0,2,4,6,8
}