+ 2
Why we have "3" in the output? Thanks
public class Program { public static void main(String[] args) { int x = 1; do { System.out.println(x); x++; if(x==3){ continue; } } while(x <= 5); } } output 1 2 3 4 5
4 Answers
+ 19
If you want to remove this number you have to place println function after the "if" condition.
+ 5
because you first print value then writ the continue statement try it other way round
+ 1
Because you print value before check. You should move println line below if clause.
0
To initialize, to give condition and to increase or decrease the value.