title: How to use ConcurrentLinkedQueue?
body: <p>How do I use a <code>ConcurrentLinkedQueue</code> in Java?<br>
  Using this <code>LinkedQueue</code>, do I need to be worried about concurrency in the queue? Or do I just have to define two methods (one to retrive elements from the list and another to add elements to the list)?<br>
  Note: obviously these two methods have to be synchronized. Right?</p>
  
  <hr>
  
  <p><strong>EDIT:</strong> What I'm trying to do is this: I have a class (in Java) with one method to retrieve items from the queue and another class with one method to add items to the queue. The items added and retrieved from the list are objects of my own class.</p>
  
  <p>One more question: do I need to do this in the remove method: </p>
  
  <pre><code>while (queue.size() == 0){ 
    wait(); 
    queue.poll();
  }
  </code></pre>
  
  <p>I only have one consumer and one producer.</p>