R4R Java SourceCode Example of for loop

Example of for loop

This is example of for loop .

SOURCE CODE


class blocktest
{
public static void main(String args[])
{
int x,y;
y=40;
for(x=0;x<15;x++)
{
System.out.println("the value of x:"+x);
System.out.println("the value of y:"+y);
y=y-3;
}
System.out.println("the value of y:"+y);
}
}

Download Source File