title: Java multidimensional array concept
body: <p>I am defining a integer multidimensional array <code>xyz[2][3]</code> and a single dimension array <code>y={1,2,3,4}</code> and then assigning <code>xyz[0]=y</code> which is working fine. Can please somebody explain me how it is allowing to store <code>4</code> elements when the size is <code>3</code>?</p>
  
  <pre><code>  int  xyz[][]= new int [2][3];
    int [] y = {18,9,10,6,12,15,3};
    xyz[0]=y;
    System.out.println(y.length);
    System.out.println(xyz.length);
  
    java.util.Arrays.sort(y);
    for(int k=0;k&lt;xyz.length;k++)
    {
        for (int l=0;l&lt;xyz[k].length;l++)
        {
            System.out.println("xyz[k][l] : "+xyz[k][l]);
        }
    }
  </code></pre>