while loop java program code example
Example 1: java do while
do {
// loop content
} while (/* condition */);
Example 2: do while loop java
package com.journaldev.javadowhileloop;
public class JavaDoWhileLoop {
public static void main(String[] args) {
int i = 5;
do {
System.out.println(i);
i++;