Priority queue uses an unbounded Queue (Which makes sure that no tasks are missed) based on priority heap. Sometimes, it uses large bounded queues to hold the huge no of tasks that an application encounters during runtime. Depending on the type of constructor called at runtime, priority queue elements are ordered based on the natural order or by a Comparator. Null's are not allowed in the priority queue.