Java dla przyrostu o 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
}
NullPointerException