Posted by : Unknown
Sunday, 28 June 2015
Syntax:
for(initialization; condition; iteration)
statement;
Program:
class printNumber
{
public static void main(String args[])
{
for(int x=0; x<10; x++)
{
System.out.println(x);
}
}
}
Output:
0
1
2
3
4
5
6
7
8
9