PROGRAM:
To show use of Do While.
public class DoWhile
{
public static void main(String args[])
{
int i=1;
do
{
System.out.println(i);
i++;
}
while(i<=10);
}
}
OUTPUT:
1
2
3
4
5
6
7
8
9
10
Discussion
Ask a question, share your thoughts or report an error.
Sign in to participate in the discussion.
Join the discussion