title: Why does this code require casting?
body: <p>I'm studying generics right now, and to my understanding, we use generics so we can avoid/remove the need to cast, so why do I have to cast when adding the item and the linkedlist?</p>
  
  <pre><code>public class ThisIsCode&lt;E&gt; implements Code{
  
      LinkedList&lt;E&gt; list = new LinkedList&lt;&gt;();
  
      public final void add(E... item) {
          List&lt;E&gt; thingie = new LinkedList&lt;&gt;();
  
          for (E i: item) {
              thingie.add((E) item);
          }
  
          list.add((E)thingie); 
  
      }
  </code></pre>
  
  <p>I also have to cast in this method as well, and in an array?? I don't think I should be putting the item into an array, so I'm a bit confused.</p>
  
  <pre><code>public void addSingle(Object item) {
      add((E[]) item);
  
  }
  </code></pre>