HiHow can we make a hashmap synchronised by usin the collections framework

Questions by phanikumar26in   answers by phanikumar26in

Showing Answers 1 - 5 of 5 Answers

sbarik

  • Jun 16th, 2006
 

There is a static method in Collection Using which u can obtain a Synchronized version of HashMap..

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

It will give u a synchronized version of HashMap

regards

Suvendu

  Was this answer useful?  Yes

keerthana

  • Oct 24th, 2007
 

Map myThreadSafeMap = Collections.synchronizedMap( new HashMap() );

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions