title: type argument is not within bounds of type-variable
body: <p>Hi Stack Overflow community ^_^</p>
  
  <p>Basically, I am working with Stacks and converting from Infix to Postfix equations.
  This is the error message showing on screen when I am trying to compile the Stack class:</p>
  
  <pre><code>Stack.java:5: error: type argument T#1 is not within bounds of type-variable T#2
      private LinkedList&lt;T&gt; list;
                         ^
    where T#1,T#2 are type-variables:
      T#1 extends Object declared in class Stack
      T#2 extends Comparable&lt;T#2&gt; declared in class LinkedList
  </code></pre>
  
  <p>I am having real troubles trying to figure out this error but sadly I don't have a clue of what might be the problem. If I knew a little better I could have provided you with more info. </p>
  
  <p>Thanks in advance for any comments and help!</p>
  
  <p>Update: Here is my class...</p>
  
  <pre><code>package ListPkg; 
  
  public class Stack&lt;T&gt; //    implements Comparable&lt;Stack&gt;&gt;  
  { 
      private LinkedList&lt;T&gt; list; 
  
      public Stack()
      {
          this("list");
      }
      public Stack(String name)
      {
          list = new LinkedList(name);
      }
      public void push(T item)
      {
          list.insertAtFront(item);
      }
      public T pop()
      {
          list.removeFromFront();
      }
      public int lenghtIs()
      {
          return list.lengthIs();
      }
      public T peek()
      {
          return list.returnFirstNode();
      }
      public void print()
      {
          list.print();
      }
      public boolean isEmpty()
      {
          return list.isEmpty();
      }
  }
  </code></pre>