dimanche 17 décembre 2017

How to read step by step if looping has "statment if" in java [duplicate]

This question already has an answer here:

Hello i'm beginners in java

i'm already learn about for control to print 1 - 9

for (int i =0; i<10; i++){
   System.out.println(i);
}

and already knowing step by step how to read it, if 10 < 10 will false and stop and out looping just print 1 - 9

but i'm still confused, How to step by step to read this code : if looping has if statement

for(int i= 0; i < 10; i++){
    System.out.println(i + " ");
    if(i % 2 == 0){
      continue;
    } 
    System.out.println();
}

I need a step by step explanation to read this code, and i'm sorry my english so bad thanks :)

Aucun commentaire:

Enregistrer un commentaire