This is actually not a problem for solving but I felt curious that why the following code would gives the confusing indentation warning for possible missing of surrounding block:
if(x!=y)
System.out.println("not equal");
index++;
If I put the System.out.println("not equal"); inside {} the warning would go away but I feel curious in what situation the current looking code would go wrong.
Aucun commentaire:
Enregistrer un commentaire