PriorityQueue is thread safe.
(a) True
(b) False
The question was asked during an interview.
My question is from Data Structures-Queue in portion java.util – The Collections Framework of Java
(a) True
(b) False
The question was asked during an interview.
My question is from Data Structures-Queue in portion java.util – The Collections Framework of Java
Correct choice is (a) True
The best explanation: PriorityQueue is not synchronized. BlockingPriorityQueue is the thread safe implementation.