do{
//code to be executed}
while(condition);
public class DoWhileExample {
public static void main(String[] args) {
int i=1;
do{
System.out.println(i);
i++;
}
while(i<
=10);
}
}
1
2
3
4
5
6
7
8
9
10
do{
//code to be executed}
while(true);
public class DoWhileExample2 {
public static void main(String[] args) {
do{
System.out.println("infinitive do while loop");
}
while(true);
}
}
infinitive do while loop
infinitive do while loop
infinitive do while loop
ctrl+c