View Single Post
Old 09-28-2012, 09:53 AM   #22
powerfull
Woof
FFR Veteran
 
powerfull's Avatar
 
Join Date: Jan 2006
Location: MA
Posts: 173
Default Re: Continuin to fail at Java

Do you mean something like this?

Code:
for (int x = 0; x < condition; x++)
{
	for (int y = 0; y < x; y ++)
	{
		System.out.println(y);
	}
}

// For x = 3, prints out 0, 0, 1, 0, 1, 2
It goes through the for-loop condition-many times, then it'll go through another for-loop condition-many times with the current x-value as its limit every time. I hope that helps in some way.
__________________


Some music: http://soundcloud.com/wooffull

Last edited by powerfull; 09-28-2012 at 11:22 AM..
powerfull is offline   Reply With Quote