title: What exactly happens in memory when we allocate an array using an empty curly braces?
body: <p>Both of the following examples return 0, if we call <code>length</code>:</p>
  
  <pre><code>int[][] b = {};
  </code></pre>
  
  <p>or </p>
  
  <pre><code>int[] a = {};
  </code></pre>
  
  <p>I think two objects are allocated on the heap as usual: I suppose that in the second case, an object (empty array) of type <code>int[]</code> is allocated, but in the first case?</p>
  
  <p>What exactly is going on under the hood in these situations?</p>