title: How to can I create an array of 10^15 positions?
body: <p>I need to create an array of 10^15 positions, based on the amount of positions, I thought it would be necessary to create a long array, however, the index of the array needs to be Int, I tried with BigInteger but it needed to convert the BigInteger into an Int and when doing so, it changed to a negative number, so the array could not be created.</p>
  
  <p>Here's the code: </p>
  
  <pre><code>BigInteger num = new  BigInteger("1000000000000000");
      long[] array = new long[num.intValue()];
  </code></pre>
  
  <p>if I print num.intValue() it shows that the number is -1530494976</p>