title: Use of Array of length 0?
body: <pre><code>char[] arrNew = new char[0];
  System.out.println(arrNew.length);  // length = 0
  arrNew[0]='c'; // ArrayIndexOutOfBoundsException .
  </code></pre>
  
  <p>In the above code as you can clearly see there is no point in having an array of size 0. As far as I can see there is no practical usage of 0 size array. Can someone explain why the compiler allows creation of 0 length array. And also how is a 0 length array different from an array initialized to null? (i.e, is memory allocated to it as if it were a normal array?). I am sorry if this question seems stupid.</p>