Thursday, April 29, 2010

for Loop

for loop is a part of programming to execute program continuesly until it reaches the final looping of final number of loop.

example program.

int x;
for(x=0; x<=10; x++)
{
System.out.println(x);
}

sample output:

0
1
2
3
4
5
6
7
8
9
10