title: How to create a PriorityQueue with new comparator and NO specified initial capacity?
body: <p>in Java, I don't know how to create a new <code>PriorityQueue</code> with new comparator but without given the queue length? How can I create it?</p>
  
  <p>I know I can write:</p>
  
  <pre><code>Queue&lt;Node&gt; theQueue = new PriorityQueue&lt;Node&gt;(15,new Comparator&lt;Node&gt;();
  </code></pre>
  
  <p>But I hope the queue can works like <code>LinkedList</code>, I mean its length is not fixed, how can I declare it?</p>