Answers for "java for increment by 2"

0

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
}
Posted by: Guest on June-23-2020

Code answers related to "java for increment by 2"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language