Home
Q&A
Education
Technology
Credit
General
Health
Insurance
Questions
Ask a Question
Explain PriorityQueue is thread safe.
Home
Education
Explain PriorityQueue is thread safe.
asked
Mar 1, 2022
in
Education
by
JackTerrance
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 Select the correct answer from above options
java
util
1
Answer
0
votes
answered
Mar 1, 2022
by
JackTerrance
Best answer
Correct choice is (a) True The best explanation: PriorityQueue is not synchronized. BlockingPriorityQueue is the thread safe implementation.
Related questions
0
votes
Q: Explain Which class provides thread safe implementation of List?
Which class provides thread safe implementation of List? (a) ArrayList (b) CopyOnWriteArrayList (c) HashList (d) ... Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain When two threads access the same ArrayList object what is the outcome of the program?
When two threads access the same ArrayList object what is the outcome of the program? (a) Both are able ... Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain How is Arrays.asList() different than the standard way of initialising List?
How is Arrays.asList() different than the standard way of initialising List? (a) Both are same (b) ... Collections Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain What is the difference between length() and size() of ArrayList?
What is the difference between length() and size() of ArrayList? (a) length() and size() return the ... Collections Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain Which of the below is not an implementation of List interface?
Which of the below is not an implementation of List interface? (a) RoleUnresolvedList (b) Stack (c) AttibuteList ... Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain What is the worst case complexity of accessing an element in ArrayList?
What is the worst case complexity of accessing an element in ArrayList? (a) O(n) (b) O(1) (c) O( ... The Collections Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain What is the default clone of HashSet?
What is the default clone of HashSet? (a) Deep clone (b) Shallow clone (c) Plain clone (d) Hollow ... Collections Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain Do we have get(Object o) method in HashSet.
Do we have get(Object o) method in HashSet. (a) True (b) False The question was posed to me by my ... The Collections Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain What does Collections.emptySet() return?
What does Collections.emptySet() return? (a) Immutable Set (b) Mutable Set (c) The type of Set ... Collections Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain What are the initial capacity and load factor of HashSet?
What are the initial capacity and load factor of HashSet? (a) 10, 1.0 (b) 32, 0.75 (c) 16, 0. ... - The Collections Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain Set has contains(Object o) method.
Set has contains(Object o) method. (a) True (b) False The question was posed to me by my school ... Collections Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain What is the difference between TreeSet and SortedSet?
What is the difference between TreeSet and SortedSet? (a) TreeSet is more efficient than SortedSet (b) SortedSet ... Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain What happens if two threads simultaneously modify TreeSet?
What happens if two threads simultaneously modify TreeSet? (a) ConcurrentModificationException is thrown (b) Both threads ... of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain Which of these standard collection classes implements a linked list data structure?
Which of these standard collection classes implements a linked list data structure? (a) AbstractList (b) LinkedList ... of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain Which of these classes implements Set interface?
Which of these classes implements Set interface? (a) ArrayList (b) HashSet (c) LinkedList (d) DynamicList I ... Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
...