title: Why can't we pass ArrayList<Integer> to a method with (Integer...) parameter?
body: <p>I'm trying to do this Java How To Program Task: "Write an appliaction that calculates the product 
  of a series of integers that are passed to method 'product' using a variable-length argument list.</p>
  
  <p>I get the error message that the method product(Integer...) in the type VarLenArgumentList is not applicable for
  the arguments (ArrayList). Why so, if Java treats the variable-length argument list as an array? Isn't an ArrayList an array?</p>
  
  <p>What is another way of completing the task?</p>
  
  <pre><code>Scanner keyboard = new Scanner(System.in);
  int flag = 0;
  ArrayList&lt;Integer&gt; intArray = new ArrayList&lt;&gt;();
  
  do
  {
      System.out.print("Enter a positive integer or '-1' to quit:" );
      int input = keyboard.nextInt();
      intArray.add(input);
  
  } while (flag != -1);
  
  product(intArray); 
  }
  
  public static int product (Integer... numbers) 
  {
      int total = 0;
  
      for (Integer element : numbers)
          total *= element;
  
      return total;
  }
  </code></pre>