title: Add Primitive Array to Linked List
body: <p>I am trying to add an array of integers to a Linked List. I understand that primitive types need a wrapper which is why I am trying to add my int elements as Integers. Thanks in advance.</p>
  
  <pre><code>int [] nums = {3, 6, 8, 1, 5};
  
  LinkedList&lt;Integer&gt;list = new LinkedList&lt;Integer&gt;();
  for (int i = 0; i &lt; nums.length; i++){
  
    list.add(i, new Integer(nums(i)));
  </code></pre>
  
  <p>Sorry - my question is, how can I add these array elements to my LinkedList?</p>