title: "Arraylist not applicable in double" error
body: <p>Im using an external library. and after changing the array from array list. I got this error:</p>
  
  <pre><code>The method add(double, double) in the type XYSeries is not applicable for the arguments (int, ArrayList&lt;Double&gt;)
  </code></pre>
  
  <p>this is my code:</p>
  
  <pre><code>ArrayList&lt;Double&gt; addition = new ArrayList&lt;&gt;();
  
  for (int i = 0; i &lt; x.length; i++) {
          additionSeries.add(x[i], addition);
  </code></pre>
  
  <p>an error in <code>additionSeries.add</code></p>
  
  <p>what could be the solution for this?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <pre><code>if(Game.isNewScore) {
      if (addition.size() == 5){
          addition.remove(0);
      }
      addition.add(Game.score);
  }
  </code></pre>
  
  <p>this is my code in add value in my arraylist</p>