Multidimensional arrays on Oracle Tutorials
<p>I am going throught the Oracle tutorials on Java and there is one thing I do not understand so far. This is why the outcome of the arrays is what is shown. </p>

<p>The code is:</p>

<pre><code>public static void main (String [] args){

      String[][] names = {
                {"Mr. ", "Mrs. ", "Ms. "},
                {"Smith", "Jones"}
            };
            // Mr. Smith
            System.out.println(names[0][0] +
                names[1][0]);
            // Ms. Jones
            System.out.println(names[0][2] +
                names[1][1]);
        }   
</code></pre>

<p>I understand that Mr gets printed out as the index is 0. But smith gets printed out when it is [1][0], and also I understand how Ms is printed out because the index is 2. But I do not understand how Jones is printed out. </p>

<p>Please can someone help me to understand how the multidimensional arrays use the indexes. </p>

<p>Thanks</p>

<p>edit:</p>

<p>Please correct me if I am wrong but does multidimensional arrays work like rows. So the first array would be 0 and the next array would be 1 and so on?</p>

<p>Which is why [1] which is the second array and [0] is equal to smith because it is the index 0?</p>
