how can we synchronize Hash map?

Answers were Sorted based on User's Feedback



how can we synchronize Hash map?..

Answer / vikram kc

Collections.synchronizedMap(hashMap)

Is This Answer Correct ?    18 Yes 2 No

how can we synchronize Hash map?..

Answer / ravikiran

Collections.synchronizedMap(new HashMap());

Is This Answer Correct ?    10 Yes 1 No

how can we synchronize Hash map?..

Answer / prabhu

hasgmap hs=new hashmap();
vector v =new vector (hs);

Is This Answer Correct ?    2 Yes 10 No

Post New Answer

More Core Java Interview Questions

What happens if an exception is throws from an object's destructor?

0 Answers   Amazon,


How do you use substring in java?

0 Answers  


which class is the wait() method defined in? : Java thread

0 Answers  


Is 0 true or false in java?

0 Answers  


What does n mean?

0 Answers  






What is boolean used for?

0 Answers  


What is proper subset?

0 Answers  


Suppose there is an Online shopping cart application having different objects like Cart, SelectionItem, Billing, COnfiguration, Authentication, Authorization, PersonalDetails etc. Out of this which one can be made a singleton pattern and why?

2 Answers   RBS,


What is the exact difference in between Unicast and Multicast object?

0 Answers  


What are the advantages and disadvantages of object cloning?

0 Answers  


Is passing by reference faster?

0 Answers  


What are design patterns and please explain?

0 Answers  


Categories