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
}
Also in Java:
- java convert String to int
- java string regexp replace
- java create file
- Diamond Shape Pattern Program in Java
- java program to get all cat indices in elasticsearch javadoc
- how to make a dictionary in java
- python to java converter
- java collapse string array
- java stack pop
- java import biginteger
- java hello world
- java pass array as method parameter
- two dimensional array in java example program
- java search file in folder
- Caused by: java.lang.NumberFormatException: Invalid int: ""
- if statement java
- jtable disable row selection
- log4j with spring boot restful services
- waht does&& mean in java
- print arraylist java
- take a value from keyboard java
- java exponencial
- Java create array of array
- indexof java