Is hashmap get thread safe?



Is hashmap get thread safe?..

Answer / Prafulla Kumar

No, HashMap is not thread-safe by default. If you need to access or modify a HashMap concurrently across multiple threads, consider using ConcurrentHashMap or synchronized blocks.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

Does concat mutate array?

1 Answers  


Differentiate between set and map.

1 Answers  


What is the difference between hashset and linkedhashset?

1 Answers  


Explain what is binary search?

1 Answers  


Do all declaration statements result in a fixed reservation in memory?

1 Answers  


Can hashmap store null values?

1 Answers  


What sort does arrays sort use?

1 Answers  


what is mean by d-queue?

11 Answers  


Explain the types of linked lists.

1 Answers  


Explain how is linked list implemented?

1 Answers   BPL,


How many null values are allowed in hashmap?

1 Answers  


What are the advantages and disadvantages of linked list?

1 Answers  


Categories