top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Can you explain about the priority Queue in Java ?

+1 vote
71 views
Can you explain about the priority Queue in Java ?
posted Jan 7, 2015 by Roshni

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

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.

answer Jan 8, 2015 by Karthick.c
...