title: Implementing queue in java
body: <p>Implementing a queue in Java is pretty common interview question. I surfed online and saw many implementations where they do fancy stuff like implementing queue interface and writing own <code>addLast()</code> and <code>removeFirst()</code> methods. My question is can't I just use <code>LinkedList()</code> class and use its predefined methods <code>addLast</code> and <code>removeFirst</code> methods to do the same??
      e.g.</p>
  
  <pre><code>LinkedList&lt;Student&gt; qu=new LinkedList&lt;Student&gt;();
  qu.add(new Student("anadkat1"));
  qu.add(new Student("anadkat2"));
  qu.add(new Student("anadkat5"));
  System.err.println(qu);
  qu.removeFirst();
  System.err.println(qu);
  </code></pre>
  
  <p>This is giving me the perfect result. Isn't this enough?</p>