I am writing an application which will return a HashMap to user. User will get reference to this MAP. On the backend, I will be running some threads which will update the Ma
ConcurrentHashMap was designed and implemented to avoid any issues with the scenarios you describe. You have nothing to worry about.
A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updates.updates.
javadoc of ConcurrentHashMap