Array iteration : <p>I have a question regarding the iteration of a 2d array. Why does this work with <strong>System.out.println(n)</strong> and not <strong>System.out.println(row[n])</strong>? I am trying to print all the numbers.</p>

<pre><code>public class test
{
    public static void main(String[] args){
        int numbers[][] = {{1,2,3}, {4,5,6}};
        for (int [] row : numbers){

            for (int n: row){

                System.out.println(n);

            }
        }
    }
}
</code></pre>
