Example Application: LOOP - doWhile and while
do {
// code block to be executed in loop
} while (condition);
Code snipped
int i=0;
do {
// TODO
System.out.println(i);
i++;
} while (i < 10);
while (condition) {
// code block to be executed in loop
}
Code snipped
int i=0;
while (i < 10) {
// TODO
System.out.println(i);
i++;
}