import java.util.Iterator;
import java.util.PriorityQueue;
class PriorityQueueToString {
public static void main(String[] args) {
// creating our queue
PriorityQueue<Integer> pq = new PriorityQueue<>();
// offer is used to add elements in a queue
pq.offer(12);
pq.offer(13);
pq.offer(14);
pq.offer(15);
pq.offer(16);
pq.offer(17);
// Printing the Queue as A String
System.out.println(pq.toString());
}
}