title: Queue using linked list implementation in Java
body: <p>I quickly wrote a linked list class in Java. I want to write another queue class which uses the linked list. How would I achieve this in Java? I don't fully understand the implements / extends keywords... this is what my queue looks like ( for example):</p>
  
  <pre><code>public class Queue&lt;T&gt; implements LinkedList
  {
      protected LinkedList&lt;T&gt; list;
  
      public Queue() {
          list = new LinkedList&lt;T&gt;();
      }
  
      public void add( T element) {
          list.add( element);
      }
  
      public T removeLast() {
          return list.removeLast();
      }   
  }
  </code></pre>
  
  <p>Also note that the linked list class is also generic.
  I know there are already built in classes to achieve this functionality, but I wanted to learn ( which is why I am trying to do this manually)</p>
  
  <p>EDIT: Additionally, in the end, I would like to be able to say something like this:</p>
  
  <pre><code>Queue&lt;String&gt; aQueue = new LinkedList&lt;String&gt;();
  </code></pre>