Question: 3) a) HashMap and HashSet are not thread safe- by design. What are the hazards, concerning concurrency? How would you solve this potential problem? b)
3)
a) HashMap and HashSet are not thread safe- by design. What are the hazards, concerning concurrency? How would you solve this potential problem?
b) For Blocking Queues, put() and take() are synchronized methods. Why is this required?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
