java if do code example
Example 1: do statement java
do
{
statement(s);
} while(condition);
Example 2: if statement java
int x = 3;
if (x == 3) {
// block of code to be executed if the condition is true
}
do
{
statement(s);
} while(condition);
int x = 3;
if (x == 3) {
// block of code to be executed if the condition is true
}