What do you want to save?
Add Code snippet
New code examples
-
Java 2021-10-21 20:29:08
?whats is the difference between while loop and for loop
//First Code WHILE loop int x = 0; while (x < 10) { //Do Something while x is less than 10 // if you don't want infinity loop increse x x++; } //Second Code But Now Its FOR loop with the same int x with different different result int x = 10 ... Add solution