title: arraylist cannot find symbol: method addLast
body: <p>I'm having a problem with using the addLast method after declaring an ArrayList.  Here's the class code:</p>
  
  <pre><code>import java.util.*;
  
  public class Neuron{
  
          public int m_numInputs;
          public ArrayList&lt;Double&gt; m_vecWeight = new ArrayList&lt;Double&gt;();
  
          public Neuron(int numInputs){
                  this.m_numInputs = numInputs + 1;
  
                  //additional weight for bias
                  for(int i = 0; i &lt; numInputs + 1; ++i){
                          Random rand = new Random();
                          m_vecWeight.addLast(rand.nextFloat() * 2.0 - 1.0);
  
                  }
          }
  
  }
  </code></pre>
  
  <p>So the error I'm getting is: </p>
  
  <pre><code>cannot find symbol: method addLast(double), location: variable m_vecWeight of type ArrayList&lt;Double&gt;
  </code></pre>
  
  <p>Any guidance would be greatly appreciated.</p>