title: Squaring Numbers in java using Math.pow getting error of precision
body: <p>I have do to a question to write a method to input an array of type LONG that stores the values of all the powers of 2 from 0 to 63 (i.e. 2<sup>0</sup> to 2<sup>63</sup>)</p>
  
  <p>Output the contects of the array screen.
  Hint: Math.pow(x,y) is ued to put number x to exponent y</p>
  
  <p>so far I have something like</p>
  
  <p>I keep getting error or Math.pow(size,2); required long, found double. 
  I tried Math.pow(i,2); I get same error./ possible loss of precision ,, any help :) thanks</p>
  
  <pre><code>class ws3q2
  {
      public static void main(String[]args)
      {
  
          int ARRAY_SIZE = 5;
  
          long size = ARRAY_SIZE;
  
          long[] array = new long[ARRAY_SIZE];
  
          for(int i = 0; i &lt; ARRAY_SIZE; ++i)
          {
          array[i] = Math.pow(size,2);
          }
  
      }
  }
  </code></pre>