what is difference between multidimensional array in java and c++?
<pre><code>char a[][4] = {{'a','a','a'},
               {'a','a','a'},
               {'a','a','a'},
               {'a','a','a'}};
</code></pre>

<p>In c++ you must initialize the last index of an array.</p>

<p>In java if you do this it will result in an error.</p>

<p><strong>Can someone explain me why??</strong><br><br></p>

<p>Also when I check the length of array like this in java.</p>

<pre><code>System.out.println(a[0].length);
</code></pre>

<p>the result is the length of the column in the array</p>

<p>lets says there is an '\0' at the end of array and when I check the length of array in c++ like this.</p>

<pre><code>cout &lt;&lt; strlen(a[0]) 
</code></pre>

<p>I get the length of an entire array.</p>

<p><strong>Can I just get the lenght of the row or column in an array in c++ like in java?</strong></p>

<p>Is this becuase array in java is an object?</p>
