PriorityQueue in Java
PriorityQueue in java is a queue based implementation which sorts its elements based on the natural ordering defined. It is not a normal FIFO data structure like LinkedList.
PriorityQueue is an unsynchronized collection. PriorityQueue can be applied for priority based application tasks. A good example for PriorityQueue is the Support tickets which has priority assigned to them. More critical tickets should be pushed forward so that they are addressed earlier.
In this video tutorial, i have demonstrated how priority queue works and also showed important methods.