public class For_row_column
{
	public static void main (String[] args)
	{
		for (int r=1; r<4; r++)		
		{
			for (int c=1; c<3; c++)	
			{
				array[r][c]=r:c;
				System.out.println (array[r][c]);
			}
		}

	}
}




__________________________________________________________________________________________



// Another example of the nested 'for' loop:



public class For_ij
{
	public static void main (String[] args)
	{
		int x = 0;

		for (int i=1; i<4; i++)			//outer loop's running 3 times
		{
			for (int j=1; j<3; j++)		//inner loop's running 2 times
			{
				System.out.println (i+ "*" +j+ "=" +(i*j));

				x++;
				System.out.println("    x = " +x);		//max  x=6
			}
			System.out.println ();
		}

	}
}


// each time outer loop is executed, inner loop will be executed 2 times.
// Outer loop is executed 3 times, so total 6 calculations (max x=6).

