title: Is a Java array of primitives stored in stack or heap?
body: <p>I have an array declaration like this:</p>
  
  <pre><code>int a[];
  </code></pre>
  
  <p>Here <code>a</code> is an array of primitive <code>int</code> type. Where is this array stored? Is it stored on heap or stack? This is a primitve type <code>int</code>, all primitive types are not stored on heap.</p>