Two dimentional arrays (distinguishing the columns from the rows)?
<p>I am a novice to java. Im trying to write a two-dementional array that writes out a lottery ticket (6 integers) 10 times</p>

<pre><code>int[][] lottery = new int[6][10];

for (int i=0; i &lt; lottery.length; i++)
 for (int j=0; j &lt; lottery[0].length; j++)  
  lottery[i][j] = (int)(50.0 * Math.random());

for (int i=0; i &lt; lottery.length; i++)
 for (int j=0; j &lt; lottery[0].length; j++)      
 {
  /*if i &lt; lottery.length
  System.out.print(lottery[i][j] + " ");
  else
  System.out.println(lottery[i][j]);*/
 }  
</code></pre>

<p>How do I write it out as 10 rows of 6 integers</p>

<pre><code>23 12 31 49 3 17 
9 1 22 13 36 50
.
.
.
</code></pre>
