I'm learning multidimensional arrays and trying to write them out with for. I found it, but I don't understand how it works : <p>so I'm learning Java nad now I'm on multidimensional arrays. I think I understand how they work. And I found how to write them out with for, but the whing is what happens with for and why we need two for's. This is the code:</p>

<pre><code>int[][] myNumbers = { {1, 2, 3, 4}, {5, 6, 7} };

for (int i = 0; i &lt; myNumbers.length; i++) {

    for (int j = 0; j &lt; myNumbers[i].length; j++) {

        System.out.println(myNumbers[i][j]);

    }
}
</code></pre>
