title: Priority Queue Usage in Java
body: <p>I want to create a Priority Queue in Java such that I could enter a &lt;Integer, Character&gt; at each position. Here, higher the integer higher should be it's priority.</p>
  <p>For example, let's say I have &lt;20, 'A'&gt;, &lt;30, 'B'&gt;, &lt;40, 'C'&gt;, if I dequeue I should get C (or &lt;40, 'C'&gt; whatever). I wish to use this once and then again enqueue &lt;39, 'C'&gt;. And so on until it ends at 90. (If the integers are equal, I don't care of the order.)</p>
  <p>Despite several Google searches, I only find examples of adding an integer or a Class and having a comparator function. Can someone help me resolve this?</p>