Java Interview Question And Answer How to Synchronize HashMap In Java Interview Question

Published: 08 December 2013
on channel: Interview DOT
1,222
8

Click here -    / @interviewdot   to get notifications. Java Interview Question And Answer How to Synchronize HashMap In Java Interview Question

A Job Portal
http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com
One Click Dream Job - http://www.interviewdot.com/upload-re...

Other Top Job Portals
www.Naukri.com
www.MonsterIndia.com
www.TimesJobs.com

Are you looking for a new Job ?
InterviewDot.com - A Job Portal
http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com
One Click Dream Job - http://www.interviewdot.com/upload-re...

HashMap is not synchronized internally i.e if multiple threads access/modify the contents of HashMap,then there is a possibility of inconsistent data in HashMap-- hence its not thread safe.

So before using the HashMap in a multiple thread environment ,it should be synchronized.

Map m = Collections.SynchronizedMap(new HashMap(...));


On this page of the site you can watch the video online Java Interview Question And Answer How to Synchronize HashMap In Java Interview Question with a duration of hours minute second in good quality, which was uploaded by the user Interview DOT 08 December 2013, share the link with friends and acquaintances, this video has already been watched 1,222 times on youtube and it was liked by 8 viewers. Enjoy your viewing!