title: How to pass int array as an argument to a constructor?
body: <p>Could someone tell me if its possible to pass an int array as an argument to a constructor?</p>
  
  <p>I have tried the following:</p>
  
  <pre><code>public static void main (String args[]){
  
      Accumulator[] X = new Accumulator[3];     
  
  }
  
  public Accumulator(int[] X) {
      A= new int[X.length];
      for (int i=0; i&lt;X.length; i++)
          A[i] = X[i];
  }
  </code></pre>