why Array constants can only be used in initializer?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6348479/arrays-constants-can-only-be-used-in-initializers-error">Arrays constants can only be used in initializers error</a>  </p>
</blockquote>



<p>i was studying array and i came through this short-cut method of declaring and initializing an array in 1 line.e.g- </p>

<pre><code>int[] a = {1,2,3,4,5};
</code></pre>

<p>but when i tried to do following code i got this compiler error saying "Array constants can only be used in initializer".</p>

<pre><code>int[] a;
a={1,2,3,4};
</code></pre>

<p>please help</p>

<p>thanks</p>
