lundi 31 juillet 2017

Missing update statement in if statement makes infinite loop [duplicate]

This question already has an answer here:

Why does this code produce an infinite loop?

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

Aucun commentaire:

Enregistrer un commentaire