is do-while loop still used in java code example
Example 1: java do while
do {
// loop content
} while (/* condition */);
Example 2: java while
while (condition) {
// code block to be executed
}
do {
// loop content
} while (/* condition */);
while (condition) {
// code block to be executed
}