while(1) in java code example
Example 1: what is a do while loop in java
do {
//something you want to execute at least once
} while (someBooleanCondition);
Example 2: while loop in java
A while loop iterates a block of statements until condition is true. In a
while loop condition is executed first.
Syntax:
while(condition)
{
// code goes here
}
Example 3: java while
while (condition) {
// code block to be executed
}