While Loop Example in Java


Here is the simple program for printing basic example using While Loop in Java.

Source Code

import java.io.*;
import java.util.Scanner;
class while_Pro
{// Tutor Joes Computer Education
  public static void main(String args[])
  {
   int i=0; // step-1
   while(i<=10) // step-3
   {
     System.out.println(i);
     i++;
   }
  }
}
To download raw file Click Here

Output

0
1
2
3
4
5
6
7
8
9
10


Learn All in Tamil © Designed & Developed By Tutor Joes