Hi =) I have a question in my coding and I have no idea on it so I make a similar coding post here for help.
this is my coding:
package test;
public class Test {
public static void main(String[] args) {
int i=0, j=5;
while(i<10){
skip(i,j);
System.out.println(i);
i++;
}
}
public static void skip(int i, int j){
if(i==j){
i+=1;
}
}
}
My problem is how can I skip the integer 5 with the call function skip?
my outcome should be like this: ("5" did't print out)
0
1
2
3
4
6
7
8
9