title: Array-List inside constructor as one of the parameter, how to create a new object?
body: <p>i am having problem with a constructor that takes an arrayList as one of the arguments.</p>
  
  <pre><code>public class ItemisedProductLine extends ProductLine{
  
  public static ArrayList&lt;String&gt; serialNumbers;
  
  public ItemisedProductLine(String productCode, double recRetPrice, double salePrice, int quantity, String description, ArrayList&lt;String&gt; SerialNumbers){
      super( productCode,  recRetPrice,  salePrice,  quantity,  description);
      this.serialNumbers = serialNumbers;
  }    
  </code></pre>
  
  <p>}</p>
  
  <p>Now in my class Inventory i want to instantiate a new ItemisedProductLine and pass an arryList of serial number to the constructor</p>
  
  <pre><code>ItemisedProductLine item = new ItemisedProductLine("productCode", 2600, 2490, 2, "descrpition", new ArrayList&lt;String&gt;("1233456", "6789123"));
  </code></pre>
  
  <p>Is this possible in Java? It seem to be not a common task to do, did not found any example.</p>
  
  <p>As alternative i could have used an generic array instead of Array-List but then i can not initialize it because of the unknown size</p>
  
  <p>Let's hope i'm not forgetting another parenthesis :-)</p>
  
  <p>Last Thing is the error is "no suitable constructor found ArraList&lt;>"</p>