Java double[][] Issue
<p>I'm doing the following on my code:</p>

<pre><code>double[][] temp=new double[0][2];
</code></pre>

<p>The program will run with no runtime exceptions. When I get the length of the temp like this <code>temp.length</code> it returns 0 and when I tried accessing the length of the inner arrays like this <code>temp[0].length</code> it always throws an <code>ArrayIndexOutOfBoundsException</code>. (That was only a test.)</p>

<p>Now I am wondering, Java did create a array with 0 length and at the same time an inner array with a length of 2 in an array with 0 length?</p>

<ol>
<li>Did this kind of declaration has implications on memory management?</li>
<li>Will it develop complications on the coding and running the code?</li>
<li>Did Java really permit this kind of declaration?</li>
<li>In what sense did they permit this kind of declaration or did they just overlook this kind of situation?</li>
<li>And if they permit this declaration does it also has some special uses?</li>
</ol>

<p>I was just exploring the possibility of doing this kind of declaration and had been questioning myself if this is really permissible.</p>

<p>Your opinions are gladly appreciated.</p>
