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

Publié le: 08 décembre 2013
sur la chaîne: 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(...));


Sur cette page du site, vous pouvez voir la vidéo en ligne Java Interview Question And Answer How to Synchronize HashMap In Java Interview Question durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Interview DOT 08 décembre 2013, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 1,222 fois et il a aimé 8 téléspectateurs. Bon visionnage!