Java Tutorial
- Runtime
- java 21.0.12
- Files
- 60 files · 24 KB
- Runs
- 50 runs
- Published
package sessionEight;public class DoWhileLoop { public static void main(String[] args) { int i = 10; // initialize variable by one do { // execute the code inside the block System.out.println(i); // print the current value of i i++; // update the value } while (i <= 5); // Repeat while i is less than or equal to 5 }}