int i = 0;
while (i < 10) {
if (i == 4) {
i++; //why do I need this line ?
continue;
}
System.out.println(i);
i++;
}
int i=0;
while(i<10){
if(i%2==0){
i++;
continue;// If it's pair we return to the while
}
System.out.println(i);// If is not we print it.
i++;
}
class Main {
public static void main(String[] args) {
// for loop
for (int i = 1; i <= 10; ++i) {
// if value of i is between 4 and 9
// continue is executed
if (i > 4 && i < 9) {
continue;
}
System.out.println(i);
}
}
}
continue label;