import java.util.Iterator;
import java.util.PriorityQueue;
class PriorityQueueRemove {
public static void main(String[] args) {
// creating our queue
PriorityQueue<Integer> pq = new PriorityQueue<>();
pq.add(12);
pq.add(13);
pq.add(14);
pq.add(15);
pq.add(16);
pq.add(17);
System.out.println("Queue pq before invokinh remove() method");
System.out.println("pq = " + pq);
pq.remove();
System.out.println("after invoking remove() method the queue is");
System.out.println("pq = " + pq);
System.out.println("Queue pq before invoking clear() method");
System.out.println("pq = " + pq);
pq.clear();
System.out.println("Queue after invoking clear() method");
System.out.println("pq = " + pq);
}
}