java whiles code example
Example 1: java do while
do {
// loop content
} while (/* condition */);
Example 2: while loop in java
public class WhileLoopDemo
{
public static void main(String args[])
{
int a = 1;
while(a < 10)
{
System.out.println(a);
a++;
System.out.print("\n");
}
}
}