title: Using generics and trying to get rid of the unsafe operations warning
body: <p>Here is my code, but I keep getting the "Note: LinkedListAdd.java uses unchecked or unsafe operations." I'm trying to do what I can to get rid of it, but nothing seems to be working. The base class compiles fine and has no warning, and the check seems to be coming from the add all method. Any ideas?</p>
  
  <pre><code>public class LinkedListAdd&lt;E extends Comparable &lt;E&gt; &gt; extends LinkedList&lt;E&gt;
  {
    public LinkedListAdd()
    {
       super();
    }
  
    public &lt;E extends Comparable&lt;E&gt; &gt; boolean addAll(final int index, final E[] array)
    {
       if(index &lt; 0 || index &gt; this.size())
          throw new IndexOutOfBoundsException("Index out of bounds");
       if(array == null)
          throw new NullPointerException("Null array");
  
       Node nn = null; 
       for(int y = array.length - 1; y &gt;= 0; y--)
       {
          nn = new Node(array[y], null);
          if(this.size() == 0)
          {
             this.head.next = nn;
             this.size += 1;
          }
          else
          {
             Node cur = this.head.next, prev = null;
             for(int x = 0; x &lt; index; x++)
             {
                prev = cur;
                cur = cur.next;
             }
             if(prev == null)
             {
                nn.next = cur;
                this.head.next = nn;
                this.size += 1;
             }
             else
             {
                prev.next = nn;
                nn.next = cur;
                this.size += 1;
             }
          }
       }
       if(nn == null)
          return false;
       return true;
    }
  
  }//end class LinkedListSort
  </code></pre>
  
  <p>Here is the base class</p>
  
  <pre><code>  public class LinkedList&lt;E extends Comparable &lt;E&gt; &gt;
    {
       protected static class Node&lt;E extends Comparable &lt;E&gt; &gt;
       {
          public E data;
          public Node&lt;E&gt; next;
  
          public Node()
          {
             this.next = null;
             this.data = null;
          }// end DVC
  
          public Node(final E data, final Node&lt;E&gt; next)
          {
             this.next = next;
             this.data = data;
          }// end EVC
       }// end class Node
  
       protected Node &lt;E&gt; head;
       protected int size;
  
       public LinkedList()
       {
          this.head = new Node&lt;&gt;();
          this.size = 0;
       }
  
       public void clear()
       {
          this.head = null;
          this.size = 0;
       }// end clear
  
       public int size(){return this.size;}
  
       public void addFirst(final E data)
       {
          this.head.next = new Node&lt;&gt;(data, this.head.next);
          size ++;
       }// end
  
       public String toString()
       {
          String temp = "List size: " + this.size;
          if(this.head.next == null)
             return temp += "\nEmpty List";
  
          else
          {
             temp += "\n";
             Node&lt;E&gt; cur = head.next;
             while(cur != null)
             {
                temp += cur.data + " ";
                cur = cur.next;
             }
             return temp;
          }// end else
  
       }// end toString
  
    }// end class
  </code></pre>