do-while loops are similar to while loops but guarantee the loop body will execute at least once.
Source Code
public class DoWhileLoopExample {
public static void main(String[] args) {
int i = 1;
do {
System.out.println("Value of i: " + i);
i++;
} while (i <= 5);
}
}