title: how to declare 10^9 size array in java
body: <p>The following error is being shown:</p>
  
  <blockquote>
    <p>"Exception in thread "main" java.lang.OutOfMemoryError: Java heap space"</p>
  </blockquote>
  
  <p>when I declare:</p>
  
  <pre><code>long[] ar = new long[1000000000];
  </code></pre>
  
  <p>So how to declare an array which size is 10^9?</p>